Function: sgml-value
sgml-value is a byte-compiled function defined in sgml-mode.el.gz.
Signature
(sgml-value ALIST)
Documentation
Interactively insert value taken from attribute-rule ALIST.
See sgml-tag-alist for info about attribute rules.
Source Code
;; Defined in /usr/src/emacs/lisp/textmodes/sgml-mode.el.gz
(defun sgml-value (alist)
"Interactively insert value taken from attribute-rule ALIST.
See `sgml-tag-alist' for info about attribute rules."
(setq alist (cdr alist))
(if (stringp (car alist))
(insert "=\"" (car alist) ?\")
(if (and (eq (car alist) t) (not sgml-xml-mode))
(when (cdr alist)
(insert "=\"")
(setq alist (skeleton-read (lambda ()
(completing-read
"Value: " (cdr alist)))))
(if (string< "" alist)
(insert alist ?\")
(delete-char -2)))
(insert "=\"")
(if (cdr alist)
(insert (skeleton-read (lambda ()
(completing-read "Value: " alist))))
(when (null alist)
(insert (skeleton-read '(read-string "Value: ")))))
(insert ?\"))))