changeset 39947:9c7e9fea58dc

(set-auto-coding): Fix regexps for local variables section not to eat newlines.
author Gerd Moellmann <gerd@gnu.org>
date Mon, 15 Oct 2001 08:47:11 +0000
parents 7cb5950539e9
children 3b95fca1df77
files lisp/international/mule.el
diffstat 1 files changed, 5 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/international/mule.el	Mon Oct 15 08:13:24 2001 +0000
+++ b/lisp/international/mule.el	Mon Oct 15 08:47:11 2001 +0000
@@ -1365,15 +1365,17 @@
 		     (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))