Commit cfe98f50 authored by Gerd Moellmann's avatar Gerd Moellmann
Browse files

(set-auto-coding): Fix regexps for local

variables section not to eat newlines.
parent dbae44c8
......@@ -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))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment