]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix some word/symbol classifications in scheme-mode's syntax table.
authorChong Yidong <cyd@stupidchicken.com>
Mon, 22 Aug 2011 03:38:30 +0000 (23:38 -0400)
committerChong Yidong <cyd@stupidchicken.com>
Mon, 22 Aug 2011 03:38:30 +0000 (23:38 -0400)
* lisp/progmodes/scheme.el (scheme-mode-syntax-table): Don't use
symbol-constituent as the default, as that stops font-lock from
working properly.

Fixes: debbugs:8843
lisp/ChangeLog
lisp/progmodes/scheme.el

index 02c88eae6678aa1cf8b4f7f501a44a2a746bbc62..e8a6cd738266a0d090678e51ff26a175c6430160 100644 (file)
@@ -1,3 +1,9 @@
+2011-08-22  Chong Yidong  <cyd@stupidchicken.com>
+
+       * progmodes/scheme.el (scheme-mode-syntax-table): Don't use
+       symbol-constituent as the default, as that stops font-lock from
+       working properly (Bug#8843).
+
 2011-08-21  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
        * mail/smtpmail.el (smtpmail-via-smtp): Only bind
index 4151e2bb79a998b5bd808c5d8b78e8ca037b4465..470b309434cf693e539f0df7926ffec4827e6eaa 100644 (file)
 (defvar scheme-mode-syntax-table
   (let ((st (make-syntax-table))
        (i 0))
-
-    ;; Default is atom-constituent.
-    (while (< i 256)
+    ;; Symbol constituents
+    ;; We used to treat chars 128-256 as symbol-constituent, but they
+    ;; should be valid word constituents (Bug#8843).  Note that valid
+    ;; identifier characters are Scheme-implementation dependent.
+    (while (< i ?0)
       (modify-syntax-entry i "_   " st)
       (setq i (1+ i)))
-
-    ;; Word components.
-    (setq i ?0)
-    (while (<= i ?9)
-      (modify-syntax-entry i "w   " st)
+    (setq i (1+ ?9))
+    (while (< i ?A)
+      (modify-syntax-entry i "_   " st)
       (setq i (1+ i)))
-    (setq i ?A)
-    (while (<= i ?Z)
-      (modify-syntax-entry i "w   " st)
+    (setq i (1+ ?Z))
+    (while (< i ?a)
+      (modify-syntax-entry i "_   " st)
       (setq i (1+ i)))
-    (setq i ?a)
-    (while (<= i ?z)
-      (modify-syntax-entry i "w   " st)
+    (setq i (1+ ?z))
+    (while (< i 128)
+      (modify-syntax-entry i "_   " st)
       (setq i (1+ i)))
 
     ;; Whitespace