Mercurial > emacs
diff lisp/files.el @ 61441:0f3d9a7cad2f
(set-auto-mode-1): Use line-end-position.
author | Stefan Monnier <monnier@iro.umontreal.ca> |
---|---|
date | Sun, 10 Apr 2005 20:50:48 +0000 |
parents | c7462c0b2dc0 |
children | 105d83135461 9deb6323655c 146c086df160 |
line wrap: on
line diff
--- a/lisp/files.el Sun Apr 10 20:49:54 2005 +0000 +++ b/lisp/files.el Sun Apr 10 20:50:48 2005 +0000 @@ -2113,22 +2113,19 @@ (setq temp (cdr temp))) (not temp)) - (search-forward "-*-" (save-excursion - ;; If the file begins with "#!" - ;; (exec interpreter magic), look - ;; for mode frobs in the first two - ;; lines. You cannot necessarily - ;; put them in the first line of - ;; such a file without screwing up - ;; the interpreter invocation. - (end-of-line (and (looking-at "^#!") 2)) - (point)) t) + (search-forward "-*-" (line-end-position + ;; If the file begins with "#!" + ;; (exec interpreter magic), look + ;; for mode frobs in the first two + ;; lines. You cannot necessarily + ;; put them in the first line of + ;; such a file without screwing up + ;; the interpreter invocation. + (and (looking-at "^#!") 2)) t) (progn (skip-chars-forward " \t") (setq beg (point)) - (search-forward "-*-" - (save-excursion (end-of-line) (point)) - t)) + (search-forward "-*-" (line-end-position) t)) (progn (forward-char -3) (skip-chars-backward " \t")