comparison lisp/textmodes/sgml-mode.el @ 87684:9349c39d2ae0

* testmodes/sgml-mode.el (sgml-tag-syntax-table): Initialize this constant with a computation on sgml-specials rather than a literal list. Without this change the syntax table is generated incorrectly, and the mode will think it's in a comment following any instance of the string "--".
author Eric S. Raymond <esr@snark.thyrsus.com>
date Wed, 09 Jan 2008 16:21:29 +0000
parents 4c3c683cdff8
children c70e45a7acfd
comparison
equal deleted inserted replaced
87683:6c04697c250d 87684:9349c39d2ae0
157 157
158 (defvar sgml-mode-syntax-table (sgml-make-syntax-table sgml-specials) 158 (defvar sgml-mode-syntax-table (sgml-make-syntax-table sgml-specials)
159 "Syntax table used in SGML mode. See also `sgml-specials'.") 159 "Syntax table used in SGML mode. See also `sgml-specials'.")
160 160
161 (defconst sgml-tag-syntax-table 161 (defconst sgml-tag-syntax-table
162 (let ((table (sgml-make-syntax-table '(?- ?\" ?\')))) 162 (let ((table (sgml-make-syntax-table sgml-specials)))
163 (dolist (char '(?\( ?\) ?\{ ?\} ?\[ ?\] ?$ ?% ?& ?* ?+ ?/)) 163 (dolist (char '(?\( ?\) ?\{ ?\} ?\[ ?\] ?$ ?% ?& ?* ?+ ?/))
164 (modify-syntax-entry char "." table)) 164 (modify-syntax-entry char "." table))
165 table) 165 table)
166 "Syntax table used to parse SGML tags.") 166 "Syntax table used to parse SGML tags.")
167 167