# HG changeset patch # User Mike Williams # Date 1017662893 0 # Node ID 1d7ee8515c45f8ec0eb2e285adbf64af696e1394 # Parent 30505fab0350c069d2ae76e40a74fbe80abb657e Add an explicit check for 'text syntax, to protect against future enhancements to sgml-lexical-context. Add sgml-empty-tag-p and sgml-unclosed-tag-p. diff -r 30505fab0350 -r 1d7ee8515c45 lisp/textmodes/sgml-mode.el --- a/lisp/textmodes/sgml-mode.el Mon Apr 01 12:03:14 2002 +0000 +++ b/lisp/textmodes/sgml-mode.el Mon Apr 01 12:08:13 2002 +0000 @@ -890,7 +890,7 @@ (sgml-beginning-of-tag t)))))) (defun sgml-value (alist) - "Interactively insert value taken from attributerule 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)) @@ -924,9 +924,20 @@ (?> . ">")))))))) +(defun sgml-empty-tag-p (tag-name) + "Return non-nil if TAG-NAME is an implicitly empty tag." + (and (not sgml-xml-mode) + (member-ignore-case tag-name sgml-empty-tags))) + +(defun sgml-unclosed-tag-p (tag-name) + "Return non-nil if TAG-NAME is a tag for which an end-tag is optional." + (and (not sgml-xml-mode) + (member-ignore-case tag-name sgml-unclosed-tags))) + (defun sgml-calculate-indent () "Calculate the column to which this line should be indented." (let ((lcon (sgml-lexical-context))) + ;; Indent comment-start markers inside