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)
This commit is contained in:
Eli Zaretskii
2021-06-25 08:36:27 +03:00
parent 1c10517f01
commit 3c674ffcca

View File

@@ -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'.")