mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2025-01-30 19:53:09 +00:00
(set-auto-mode-1): Use line-end-position.
This commit is contained in:
parent
35f257bb57
commit
f587e30b7f
@ -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:
|
||||
|
@ -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")
|
||||
|
Loading…
Reference in New Issue
Block a user