emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 499f5f062e: Make elisp-mode-syntax-propertize tighter to reflect


From: Lars Ingebrigtsen
Subject: master 499f5f062e: Make elisp-mode-syntax-propertize tighter to reflect syntax
Date: Fri, 6 May 2022 16:14:11 -0400 (EDT)

branch: master
commit 499f5f062efa031228dc20c5153849151f7a7614
Author: Lars Ingebrigtsen <larsi@gnus.org>
Commit: Lars Ingebrigtsen <larsi@gnus.org>

    Make elisp-mode-syntax-propertize tighter to reflect syntax
    
    * lisp/progmodes/elisp-mode.el (elisp-mode-syntax-propertize): ?\N
    and #s are case sensitive, so don't case-fold.  (And adjust regexps.)
---
 lisp/progmodes/elisp-mode.el | 33 +++++++++++++++++----------------
 1 file changed, 17 insertions(+), 16 deletions(-)

diff --git a/lisp/progmodes/elisp-mode.el b/lisp/progmodes/elisp-mode.el
index 0b647d247b..775b6ebab4 100644
--- a/lisp/progmodes/elisp-mode.el
+++ b/lisp/progmodes/elisp-mode.el
@@ -239,22 +239,23 @@ Comments in the form will be lost."
 
 (defun elisp-mode-syntax-propertize (start end)
   (goto-char start)
-  (funcall
-   (syntax-propertize-rules
-    ;; Empty symbol.
-    ("##" (0 (unless (nth 8 (syntax-ppss))
-               (string-to-syntax "_"))))
-    ;; Unicode character names.  (The longest name is 88 characters
-    ;; long.)
-    ("\\?\\\\N{[-A-Z ]\\{,88\\}}"
-     (0 (unless (nth 8 (syntax-ppss))
-          (string-to-syntax "_"))))
-    ((rx "#" (or (seq (group-n 1 "&" (+ digit)) ?\") ; Bool-vector.
-                 (seq (group-n 1 "s") "(")           ; Record.
-                 (seq (group-n 1 (+ "^")) "[")))     ; Char-table.
-     (1 (unless (save-excursion (nth 8 (syntax-ppss (match-beginning 0))))
-          (string-to-syntax "'")))))
-   start end))
+  (let ((case-fold-search nil))
+    (funcall
+     (syntax-propertize-rules
+      ;; Empty symbol.
+      ("##" (0 (unless (nth 8 (syntax-ppss))
+                 (string-to-syntax "_"))))
+      ;; Unicode character names.  (The longest name is 88 characters
+      ;; long.)
+      ("\\?\\\\N{[-A-Za-z0-9 ]\\{,100\\}}"
+       (0 (unless (nth 8 (syntax-ppss))
+            (string-to-syntax "_"))))
+      ((rx "#" (or (seq (group-n 1 "&" (+ digit)) ?\") ; Bool-vector.
+                   (seq (group-n 1 "s") "(")           ; Record.
+                   (seq (group-n 1 (+ "^")) "[")))     ; Char-table.
+       (1 (unless (save-excursion (nth 8 (syntax-ppss (match-beginning 0))))
+            (string-to-syntax "'")))))
+     start end)))
 
 (defcustom emacs-lisp-mode-hook nil
   "Hook run when entering Emacs Lisp mode."



reply via email to

[Prev in Thread] Current Thread [Next in Thread]