emacs-devel
[Top][All Lists]
Advanced

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

[Patch] Correctly handle file local variables containing a ":"


From: Bastien
Subject: [Patch] Correctly handle file local variables containing a ":"
Date: Wed, 03 Apr 2013 14:17:35 +0200
User-agent: Gnus/5.130006 (Ma Gnus v0.6) Emacs/24.3.50 (gnu/linux)

Hi,

this patch handles the issue reported by Eric here:
  http://debbugs.gnu.org/cgi/bugreport.cgi?bug=14089

The idea is to allow setting file local variables which
contain a ":" in their names, as this seems to be allowed.

If no-one objects, I'll apply this in two days.

Thanks,

=== modified file 'lisp/files.el'
--- lisp/files.el       2013-03-24 06:42:25 +0000
+++ lisp/files.el       2013-04-03 12:07:47 +0000
@@ -3046,7 +3046,7 @@
            result)
        (cond ((not end)
               nil)
-             ((looking-at "[ \t]*\\([^ \t\n\r:;]+\\)\\([ \t]*-\\*-\\)")
+             ((looking-at "[ \t]*\\([^ \t\n\r;]+\\)\\([ \t]*-\\*-\\)")
               ;; Simple form: "-*- MODENAME -*-".
               (if mode-only
                   (intern (concat (match-string 1) "-mode"))))
@@ -3058,7 +3058,7 @@
               (while (and (or (not mode-only)
                               (not result))
                           (< (point) end))
-                (unless (looking-at "[ \t]*\\([^ \t\n:]+\\)[ \t]*:[ \t]*")
+                (unless (looking-at "[ \t]*\\([^ \t\n]+\\)[ \t]*:[ \t]*")
                   (message "Malformed mode-line")
                   (throw 'malformed-line nil))
                 (goto-char (match-end 0))

-- 
 Bastien

reply via email to

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