From 62e0c675908cc11907c15d1ae084b7bca7890a1a Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Fri, 8 Jan 2021 13:53:28 +0200 Subject: [PATCH] Fix syntax of space characters * lisp/international/characters.el (tbl): Give all the space characters whose Unicode General Category is Zs the 'space' syntax. (Bug#45660) --- lisp/international/characters.el | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/lisp/international/characters.el b/lisp/international/characters.el index 87e8589e6fd..9bce419b489 100644 --- a/lisp/international/characters.el +++ b/lisp/international/characters.el @@ -526,9 +526,6 @@ with L, LRE, or LRO Unicode bidi character type.") ;; FIXME: We should probably just use the Unicode properties to set ;; up the syntax table. - ;; NBSP isn't semantically interchangeable with other whitespace chars, - ;; so it's more like punctuation. - (set-case-syntax ?  "." tbl) (set-case-syntax ?¡ "." tbl) (set-case-syntax ?¦ "_" tbl) (set-case-syntax ?§ "." tbl) @@ -602,11 +599,17 @@ with L, LRE, or LRO Unicode bidi character type.") ;; Cyrillic Extended-C (modify-category-entry '(#x1C80 . #x1C8F) ?y) - ;; general punctuation + ;; space characters (see section 6.2 in the Unicode Standard) + (set-case-syntax ?  " " tbl) (setq c #x2000) (while (<= c #x200b) (set-case-syntax c " " tbl) (setq c (1+ c))) + (let ((chars '(#x202F #x205F #x3000))) + (while chars + (set-case-syntax (car chars) " " tbl) + (setq chars (cdr chars)))) + ;; general punctuation (while (<= c #x200F) (set-case-syntax c "." tbl) (setq c (1+ c))) -- 2.39.5