aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/textmodes
diff options
context:
space:
mode:
authorStephen Berman2021-06-14 14:57:57 +0200
committerLars Ingebrigtsen2021-06-14 14:57:57 +0200
commit8f2f91f7acf5792f0dc38f8045dc0d3ffe2e4593 (patch)
tree870bf517b4aa8398bc6ce019f8830e57c93d12b4 /lisp/textmodes
parent31d40cab780a5a65e9bfbff590390a94921d6ee1 (diff)
downloademacs-8f2f91f7acf5792f0dc38f8045dc0d3ffe2e4593.tar.gz
emacs-8f2f91f7acf5792f0dc38f8045dc0d3ffe2e4593.zip
Fix problem in HTML with bracketed characters
* lisp/textmodes/sgml-mode.el (sgml-tag-syntax-table): Use bracket syntax for all Unicode bracket characters (bug#43941).
Diffstat (limited to 'lisp/textmodes')
-rw-r--r--lisp/textmodes/sgml-mode.el15
1 files changed, 13 insertions, 2 deletions
diff --git a/lisp/textmodes/sgml-mode.el b/lisp/textmodes/sgml-mode.el
index d5930e82df3..fda00ec367e 100644
--- a/lisp/textmodes/sgml-mode.el
+++ b/lisp/textmodes/sgml-mode.el
@@ -190,8 +190,19 @@ This takes effect when first loading the `sgml-mode' library.")
190 "Syntax table used in SGML mode. See also `sgml-specials'.") 190 "Syntax table used in SGML mode. See also `sgml-specials'.")
191 191
192(defconst sgml-tag-syntax-table 192(defconst sgml-tag-syntax-table
193 (let ((table (sgml-make-syntax-table sgml-specials))) 193 (let ((table (sgml-make-syntax-table sgml-specials))
194 (dolist (char '(?\( ?\) ?\{ ?\} ?\[ ?\] ?$ ?% ?& ?* ?+ ?/)) 194 brackets)
195 (map-char-table
196 (lambda (key value)
197 (setq brackets (cons (list
198 (if (consp key)
199 (list (car key) (cdr key))
200 key)
201 value)
202 brackets)))
203 (unicode-property-table-internal 'paired-bracket))
204 (setq brackets (delete-dups (flatten-tree brackets)))
205 (dolist (char (append brackets (list ?$ ?% ?& ?* ?+ ?/)))
195 (modify-syntax-entry char "." table)) 206 (modify-syntax-entry char "." table))
196 (unless (memq ?' sgml-specials) 207 (unless (memq ?' sgml-specials)
197 ;; Avoid that skipping a tag backwards skips any "'" prefixing it. 208 ;; Avoid that skipping a tag backwards skips any "'" prefixing it.