emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] /srv/bzr/emacs/trunk r105527: Fix some word/symbol classif


From: Chong Yidong
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r105527: Fix some word/symbol classifications in scheme-mode's syntax table.
Date: Sun, 21 Aug 2011 23:38:30 -0400
User-agent: Bazaar (2.3.1)

------------------------------------------------------------
revno: 105527
fixes bug(s): http://debbugs.gnu.org/8843
committer: Chong Yidong <address@hidden>
branch nick: trunk
timestamp: Sun 2011-08-21 23:38:30 -0400
message:
  Fix some word/symbol classifications in scheme-mode's syntax table.
  
  * lisp/progmodes/scheme.el (scheme-mode-syntax-table): Don't use
  symbol-constituent as the default, as that stops font-lock from
  working properly.
modified:
  lisp/ChangeLog
  lisp/progmodes/scheme.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2011-08-21 20:29:11 +0000
+++ b/lisp/ChangeLog    2011-08-22 03:38:30 +0000
@@ -1,3 +1,9 @@
+2011-08-22  Chong Yidong  <address@hidden>
+
+       * 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  <address@hidden>
 
        * mail/smtpmail.el (smtpmail-via-smtp): Only bind

=== modified file 'lisp/progmodes/scheme.el'
--- a/lisp/progmodes/scheme.el  2011-01-26 08:36:39 +0000
+++ b/lisp/progmodes/scheme.el  2011-08-22 03:38:30 +0000
@@ -55,24 +55,24 @@
 (defvar scheme-mode-syntax-table
   (let ((st (make-syntax-table))
        (i 0))
-
-    ;; Default is atom-constituent.
-    (while (< i 256)
-      (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+ i)))
-    (setq i ?A)
-    (while (<= i ?Z)
-      (modify-syntax-entry i "w   " st)
-      (setq i (1+ i)))
-    (setq i ?a)
-    (while (<= i ?z)
-      (modify-syntax-entry i "w   " st)
+    ;; 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)))
+    (setq i (1+ ?9))
+    (while (< i ?A)
+      (modify-syntax-entry i "_   " st)
+      (setq i (1+ i)))
+    (setq i (1+ ?Z))
+    (while (< i ?a)
+      (modify-syntax-entry i "_   " st)
+      (setq i (1+ i)))
+    (setq i (1+ ?z))
+    (while (< i 128)
+      (modify-syntax-entry i "_   " st)
       (setq i (1+ i)))
 
     ;; Whitespace


reply via email to

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