[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/files.el
From: |
Richard M. Stallman |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/files.el |
Date: |
Thu, 13 Dec 2001 22:21:24 -0500 |
Index: emacs/lisp/files.el
diff -c emacs/lisp/files.el:1.542 emacs/lisp/files.el:1.543
*** emacs/lisp/files.el:1.542 Tue Dec 11 19:10:17 2001
--- emacs/lisp/files.el Thu Dec 13 22:21:24 2001
***************
*** 1576,1607 ****
then we do not set anything but the major mode,
and we don't even do that unless it would come from the file name."
;; Look for -*-MODENAME-*- or -*- ... mode: MODENAME; ... -*-
! (let (beg end done modes)
(save-excursion
(goto-char (point-min))
(skip-chars-forward " \t\n")
(and enable-local-variables
(setq end (set-auto-mode-1))
! (progn
! (if (save-excursion (search-forward ":" end t))
! ;; Find all specifications for the `mode:' variable
! ;; and execute them left to right.
! (while (let ((case-fold-search t))
! (or (and (looking-at "mode:")
! (goto-char (match-end 0)))
! (re-search-forward "[ \t;]mode:" end t)))
! (skip-chars-forward " \t")
! (setq beg (point))
(if (search-forward ";" end t)
(forward-char -1)
(goto-char end))
(skip-chars-backward " \t")
(push (intern (concat (downcase (buffer-substring beg
(point))) "-mode"))
! modes))
! ;; Simple -*-MODE-*- case.
! (push (intern (concat (downcase (buffer-substring beg end))
! "-mode"))
! modes)))))
;; If we found modes to use, invoke them now,
;; outside the save-excursion.
(unless just-from-file-name
--- 1576,1606 ----
then we do not set anything but the major mode,
and we don't even do that unless it would come from the file name."
;; Look for -*-MODENAME-*- or -*- ... mode: MODENAME; ... -*-
! (let (end done modes)
(save-excursion
(goto-char (point-min))
(skip-chars-forward " \t\n")
(and enable-local-variables
(setq end (set-auto-mode-1))
! (if (save-excursion (search-forward ":" end t))
! ;; Find all specifications for the `mode:' variable
! ;; and execute them left to right.
! (while (let ((case-fold-search t))
! (or (and (looking-at "mode:")
! (goto-char (match-end 0)))
! (re-search-forward "[ \t;]mode:" end t)))
! (skip-chars-forward " \t")
! (let ((beg (point)))
(if (search-forward ";" end t)
(forward-char -1)
(goto-char end))
(skip-chars-backward " \t")
(push (intern (concat (downcase (buffer-substring beg
(point))) "-mode"))
! modes)))
! ;; Simple -*-MODE-*- case.
! (push (intern (concat (downcase (buffer-substring (point) end))
! "-mode"))
! modes))))
;; If we found modes to use, invoke them now,
;; outside the save-excursion.
(unless just-from-file-name
- [Emacs-diffs] Changes to emacs/lisp/files.el, Richard M. Stallman, 2001/12/02
- [Emacs-diffs] Changes to emacs/lisp/files.el, Eli Zaretskii, 2001/12/04
- [Emacs-diffs] Changes to emacs/lisp/files.el, Richard M. Stallman, 2001/12/11
- [Emacs-diffs] Changes to emacs/lisp/files.el,
Richard M. Stallman <=
- [Emacs-diffs] Changes to emacs/lisp/files.el, Richard M. Stallman, 2001/12/18
- [Emacs-diffs] Changes to emacs/lisp/files.el, Eli Zaretskii, 2001/12/21
- [Emacs-diffs] Changes to emacs/lisp/files.el, Richard M. Stallman, 2001/12/29