[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/files.el,v
From: |
Miles Bader |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/files.el,v |
Date: |
Thu, 24 May 2007 06:25:52 +0000 |
CVSROOT: /cvsroot/emacs
Module name: emacs
Changes by: Miles Bader <miles> 07/05/24 06:25:51
Index: lisp/files.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/files.el,v
retrieving revision 1.902
retrieving revision 1.903
diff -u -b -r1.902 -r1.903
--- lisp/files.el 22 May 2007 06:24:53 -0000 1.902
+++ lisp/files.el 24 May 2007 06:25:46 -0000 1.903
@@ -2171,10 +2171,11 @@
(defun set-auto-mode (&optional keep-mode-if-same)
"Select major mode appropriate for current buffer.
-This checks for a -*- mode tag in the buffer's text, checks the
-interpreter that runs this file against `interpreter-mode-alist',
-compares the buffer beginning against `magic-mode-alist', or
-compares the filename against the entries in `auto-mode-alist'.
+To find the right major mode, this function checks for a -*- mode tag,
+checks if it uses an interpreter listed in `interpreter-mode-alist',
+matches the buffer beginning against `magic-mode-alist',
+compares the filename against the entries in `auto-mode-alist',
+then matches the buffer beginning against `magic-fallback-mode-alist'.
It does not check for the `mode:' local variable in the
Local Variables section of the file; for that, use `hack-local-variables'.
@@ -2183,7 +2184,8 @@
-*- mode tag.
If the optional argument KEEP-MODE-IF-SAME is non-nil, then we
-only set the major mode, if that would change it."
+set the major mode only if that would change it. In other words
+we don't actually set it to the same mode the buffer already has."
;; Look for -*-MODENAME-*- or -*- ... mode: MODENAME; ... -*-
(let (end done mode modes)
;; Find a -*- mode tag
- [Emacs-diffs] Changes to emacs/lisp/files.el,v, Miles Bader, 2007/05/11
- [Emacs-diffs] Changes to emacs/lisp/files.el,v, Juanma Barranquero, 2007/05/14
- [Emacs-diffs] Changes to emacs/lisp/files.el,v, Miles Bader, 2007/05/16
- [Emacs-diffs] Changes to emacs/lisp/files.el,v, Dan Nicolaescu, 2007/05/19
- [Emacs-diffs] Changes to emacs/lisp/files.el,v, Chong Yidong, 2007/05/21
- [Emacs-diffs] Changes to emacs/lisp/files.el,v, Glenn Morris, 2007/05/22
- [Emacs-diffs] Changes to emacs/lisp/files.el,v,
Miles Bader <=