summaryrefslogtreecommitdiff
path: root/lisp/files.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/files.el')
-rw-r--r--lisp/files.el23
1 files changed, 10 insertions, 13 deletions
diff --git a/lisp/files.el b/lisp/files.el
index eca86c52a79..d5e98672d27 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -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")