aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Morris <[email protected]>2012-01-17 20:33:19 -0500
committerGlenn Morris <[email protected]>2012-01-17 20:33:19 -0500
commitf3860cea15990321965ecba3961c9f5d5700556f (patch)
treeb4be84e76dad1bee1e3333135652566e349e80f7
parent9ff5d5a5d1c6a9449558bc5625ae2d3a287860c4 (diff)
files.el doc fixes.
* lisp/files.el (auto-mode-alist, inhibit-first-line-modes-regexps) (set-auto-mode): Doc fixes.
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/files.el9
2 files changed, 9 insertions, 5 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index efb428313e..6ada090d07 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
+2012-01-18 Glenn Morris <[email protected]>
+
+ * files.el (auto-mode-alist, inhibit-first-line-modes-regexps)
+ (set-auto-mode): Doc fixes.
+
2012-01-17 Glenn Morris <[email protected]>
* isearch.el (search-nonincremental-instead): Fix doc typo.
diff --git a/lisp/files.el b/lisp/files.el
index f15c523400..6056a70d4a 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -2405,9 +2405,6 @@ If the element has the form (REGEXP FUNCTION NON-NIL), then after
calling FUNCTION (if it's not nil), we delete the suffix that matched
REGEXP and search the list again for another match.
-If the file name matches `inhibit-first-line-modes-regexps',
-then `auto-mode-alist' is not processed.
-
The extensions whose FUNCTION is `archive-mode' should also
appear in `auto-coding-alist' with `no-conversion' coding system.
@@ -2481,7 +2478,8 @@ See also `auto-mode-alist'.")
(defvar inhibit-first-line-modes-regexps
(mapcar 'purecopy '("\\.tar\\'" "\\.tgz\\'" "\\.tiff?\\'"
"\\.gif\\'" "\\.png\\'" "\\.jpe?g\\'"))
- "List of regexps; if one matches a file name, don't look for `-*-'.")
+ "List of regexps; if one matches a file name, don't look for `-*-'.
+See also `inhibit-first-line-modes-suffixes'.")
(defvar inhibit-first-line-modes-suffixes nil
"List of regexps for what to ignore, for `inhibit-first-line-modes-regexps'.
@@ -2550,7 +2548,8 @@ Also applies to `magic-fallback-mode-alist'.")
(defun set-auto-mode (&optional keep-mode-if-same)
"Select major mode appropriate for current buffer.
-To find the right major mode, this function checks for a -*- mode tag,
+To find the right major mode, this function checks for a -*- mode tag
+\(unless `inhibit-first-line-modes-regexps' says not to),
checks for a `mode:' entry in the Local Variables section of the file,
checks if it uses an interpreter listed in `interpreter-mode-alist',
matches the buffer beginning against `magic-mode-alist',