From: Eli Zaretskii Date: Fri, 25 Jun 2021 05:36:27 +0000 (+0300) Subject: Fix syntax-category of some punctuation characters X-Git-Tag: emacs-28.0.90~2036 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=3c674ffcca90aa6eec30daf99f8b8f0efcbf5bad;p=emacs.git Fix syntax-category of some punctuation characters * lisp/textmodes/text-mode.el (text-mode-syntax-table): Don't modify the global syntax-table just because we load text-mode.el. This happens at loadup time, and then affects the default syntax in all modes, not just in text-mode and its derivatives. (Bug#49214) --- diff --git a/lisp/textmodes/text-mode.el b/lisp/textmodes/text-mode.el index ffeb9e64dd7..74c6d412a65 100644 --- a/lisp/textmodes/text-mode.el +++ b/lisp/textmodes/text-mode.el @@ -49,7 +49,7 @@ (modify-syntax-entry ?' "w p" st) ;; UAX #29 says HEBREW PUNCTUATION GERESH behaves like a letter ;; for the purposes of finding word boundaries. - (modify-syntax-entry #x5f3 "w ") ; GERESH + (modify-syntax-entry #x5f3 "w " st) ; GERESH ;; UAX #29 says HEBREW PUNCTUATION GERSHAYIM should not be a word ;; boundary when surrounded by letters. Our infrastructure for ;; finding a word boundary doesn't support 3-character @@ -57,13 +57,13 @@ ;; character. This leaves a problem of having GERSHAYIM at the ;; beginning or end of a word, where it should be a boundary; ;; FIXME. - (modify-syntax-entry #x5f4 "w ") ; GERSHAYIM + (modify-syntax-entry #x5f4 "w " st) ; GERSHAYIM ;; These all should not be a word boundary when between letters, ;; according to UAX #29, so they again are prone to the same ;; problem as GERSHAYIM; FIXME. - (modify-syntax-entry #xb7 "w ") ; MIDDLE DOT - (modify-syntax-entry #x2027 "w ") ; HYPHENATION POINT - (modify-syntax-entry #xff1a "w ") ; FULLWIDTH COLON + (modify-syntax-entry #xb7 "w " st) ; MIDDLE DOT + (modify-syntax-entry #x2027 "w " st) ; HYPHENATION POINT + (modify-syntax-entry #xff1a "w " st) ; FULLWIDTH COLON st) "Syntax table used while in `text-mode'.")