]> git.eshelyaron.com Git - emacs.git/commitdiff
(set-auto-coding): Fix regexps for local
authorGerd Moellmann <gerd@gnu.org>
Mon, 15 Oct 2001 08:47:11 +0000 (08:47 +0000)
committerGerd Moellmann <gerd@gnu.org>
Mon, 15 Oct 2001 08:47:11 +0000 (08:47 +0000)
variables section not to eat newlines.

lisp/international/mule.el

index 5609d5bffeb2ccd2158291842ef8dd1a1baddaa5..67b76fdbd5ce57db9104269e00e825d60a6e3536 100644 (file)
@@ -1365,15 +1365,17 @@ function by default."
                     (re-coding
                      (concat
                       "^" prefix
-                      "[ \t]*coding[ \t]*:[ \t]*\\([^ \t]+\\)[ \t]*"
+                      ;; N.B. without the \n below, the regexp can
+                      ;; eat newlines.
+                      "[ \t]*coding[ \t]*:[ \t]*\\([^ \t\n]+\\)[ \t]*"
                       suffix "$"))
                     (re-unibyte
                      (concat
                       "^" prefix
-                      "[ \t]*unibyte[ \t]*:[ \t]*\\([^ \t]+\\)[ \t]*"
+                      "[ \t]*unibyte[ \t]*:[ \t]*\\([^ \t\n]+\\)[ \t]*"
                       suffix "$"))
                     (re-end
-                     (concat "^" prefix "[ \t]*end *:[ \t]*" suffix "$"))
+                     (concat "^" prefix "[ \t]*End *:[ \t]*" suffix "$"))
                     (pos (point)))
                (re-search-forward re-end tail-end 'move)
                (setq tail-end (point))