(find-auto-coding): Don't search for line-ending characters past the

end of the tail.
This commit is contained in:
Chong Yidong 2007-03-03 22:03:04 +00:00
parent 046c44135e
commit df94067b63

View file

@ -1735,7 +1735,7 @@ If nothing is specified, the return value is nil."
;; is just "\r" and we can't use "^" nor "$" in regexp.
(when (and tail-found (or (not coding-system) (not char-trans)))
(goto-char tail-start)
(re-search-forward "[\r\n]\^L" nil t)
(re-search-forward "[\r\n]\^L" tail-end t)
(if (re-search-forward
"[\r\n]\\([^[\r\n]*\\)[ \t]*Local Variables:[ \t]*\\([^\r\n]*\\)[\r\n]"
tail-end t)