]> git.eshelyaron.com Git - emacs.git/commitdiff
(set-auto-mode-1): Use line-end-position.
authorStefan Monnier <monnier@iro.umontreal.ca>
Sun, 10 Apr 2005 20:50:48 +0000 (20:50 +0000)
committerStefan Monnier <monnier@iro.umontreal.ca>
Sun, 10 Apr 2005 20:50:48 +0000 (20:50 +0000)
lisp/ChangeLog
lisp/files.el

index d38b0ce8e49a797f6ef99ead14d6a00f91562fa7..393c2331fa7e8112461daf45a33392e1a0fe5661 100644 (file)
@@ -1,5 +1,7 @@
 2005-04-10  Stefan Monnier  <monnier@iro.umontreal.ca>
 
+       * files.el (set-auto-mode-1): Use line-end-position.
+
        * international/latin-1.el:
        * international/latin-2.el:
        * international/latin-3.el:
index eca86c52a794cbdc23330a9d3dbd402b7ded9e1e..d5e98672d27a50d348fde2e14fe94ab0d57800ef 100644 (file)
@@ -2113,22 +2113,19 @@ Otherwise, return nil; point may be changed."
         (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")