From 16a5df72ec025b0ad513205eefb69bbf7451c7ef Mon Sep 17 00:00:00 2001 From: Gerd Moellmann Date: Mon, 15 Oct 2001 08:46:15 +0000 Subject: [PATCH] (set-auto-coding): Fix regexps for local variables section not to eat newlines. --- lisp/ChangeLog | 5 +++++ lisp/international/mule.el | 8 +++++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 8dc3ad6fb92..4752a470bd0 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2001-10-15 Dave Love + + * international/mule.el (set-auto-coding): Fix regexps for local + variables section not to eat newlines. + 2001-10-13 Stefan Monnier * bindings.el (esc-map): Revert `j' and `C-j' bindings to 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)) -- 2.39.5