From: Gerd Moellmann Date: Mon, 15 Oct 2001 08:47:11 +0000 (+0000) Subject: (set-auto-coding): Fix regexps for local X-Git-Tag: ttn-vms-21-2-B4~19430 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=cfe98f509802d1bb1a9eb45fde8fe5f5e625f1de;p=emacs.git (set-auto-coding): Fix regexps for local variables section not to eat newlines. --- diff --git a/lisp/international/mule.el b/lisp/international/mule.el index 5609d5bffeb..67b76fdbd5c 100644 --- a/lisp/international/mule.el +++ b/lisp/international/mule.el @@ -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))