Mercurial > emacs
comparison lisp/international/mule.el @ 76286:2b80d4245e1d
(find-auto-coding): Don't search for line-ending characters past the
end of the tail.
author | Chong Yidong <cyd@stupidchicken.com> |
---|---|
date | Sat, 03 Mar 2007 22:03:04 +0000 |
parents | 99dc233f3753 |
children | c4ac2750f7e4 738ce3540ffb ec58e5c426ef |
comparison
equal
deleted
inserted
replaced
76285:bb157af2087d | 76286:2b80d4245e1d |
---|---|
1733 ;; If no coding: tag in the head, check the tail. | 1733 ;; If no coding: tag in the head, check the tail. |
1734 ;; Here we must pay attention to the case that the end-of-line | 1734 ;; Here we must pay attention to the case that the end-of-line |
1735 ;; is just "\r" and we can't use "^" nor "$" in regexp. | 1735 ;; is just "\r" and we can't use "^" nor "$" in regexp. |
1736 (when (and tail-found (or (not coding-system) (not char-trans))) | 1736 (when (and tail-found (or (not coding-system) (not char-trans))) |
1737 (goto-char tail-start) | 1737 (goto-char tail-start) |
1738 (re-search-forward "[\r\n]\^L" nil t) | 1738 (re-search-forward "[\r\n]\^L" tail-end t) |
1739 (if (re-search-forward | 1739 (if (re-search-forward |
1740 "[\r\n]\\([^[\r\n]*\\)[ \t]*Local Variables:[ \t]*\\([^\r\n]*\\)[\r\n]" | 1740 "[\r\n]\\([^[\r\n]*\\)[ \t]*Local Variables:[ \t]*\\([^\r\n]*\\)[\r\n]" |
1741 tail-end t) | 1741 tail-end t) |
1742 ;; The prefix is what comes before "local variables:" in its | 1742 ;; The prefix is what comes before "local variables:" in its |
1743 ;; line. The suffix is what comes after "local variables:" | 1743 ;; line. The suffix is what comes after "local variables:" |