From 3c674ffcca90aa6eec30daf99f8b8f0efcbf5bad Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Fri, 25 Jun 2021 08:36:27 +0300 Subject: [PATCH] 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) --- lisp/textmodes/text-mode.el | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) 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'.") -- 2.39.2