From: Chong Yidong Date: Sat, 3 Mar 2007 22:03:04 +0000 (+0000) Subject: (find-auto-coding): Don't search for line-ending characters past the X-Git-Tag: emacs-pretest-22.0.96~297 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=df94067b63864b2c938164ca71163d6b768e4854;p=emacs.git (find-auto-coding): Don't search for line-ending characters past the end of the tail. --- diff --git a/lisp/international/mule.el b/lisp/international/mule.el index 6d1a17cba42..52bf6229b97 100644 --- a/lisp/international/mule.el +++ b/lisp/international/mule.el @@ -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)