diff options
| author | Richard M. Stallman | 2007-05-22 11:42:31 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 2007-05-22 11:42:31 +0000 |
| commit | c022c4c47e8c1ca9029cf6b48c6ff5daa392c9ce (patch) | |
| tree | bf21b4b4424c7f33b80549545d10ccf5d2295072 | |
| parent | 6903229ca9233950e96d576e8e4392f26a21d268 (diff) | |
| download | emacs-c022c4c47e8c1ca9029cf6b48c6ff5daa392c9ce.tar.gz emacs-c022c4c47e8c1ca9029cf6b48c6ff5daa392c9ce.zip | |
(set-auto-mode): Doc fix.
| -rw-r--r-- | lisp/ChangeLog | 4 | ||||
| -rw-r--r-- | lisp/files.el | 12 |
2 files changed, 11 insertions, 5 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 24df5a7f982..d3a4af4db06 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | 2007-05-22 Richard Stallman <rms@gnu.org> | ||
| 2 | |||
| 3 | * files.el (set-auto-mode): Doc fix. | ||
| 4 | |||
| 1 | 2007-05-22 Eli Zaretskii <eliz@gnu.org> | 5 | 2007-05-22 Eli Zaretskii <eliz@gnu.org> |
| 2 | 6 | ||
| 3 | * dos-w32.el (find-buffer-file-type-coding-system): Doc fix. | 7 | * dos-w32.el (find-buffer-file-type-coding-system): Doc fix. |
diff --git a/lisp/files.el b/lisp/files.el index 322b28f293e..2dbc0c2791a 100644 --- a/lisp/files.el +++ b/lisp/files.el | |||
| @@ -2169,10 +2169,11 @@ Also applies to `magic-fallback-mode-alist'.") | |||
| 2169 | (defun set-auto-mode (&optional keep-mode-if-same) | 2169 | (defun set-auto-mode (&optional keep-mode-if-same) |
| 2170 | "Select major mode appropriate for current buffer. | 2170 | "Select major mode appropriate for current buffer. |
| 2171 | 2171 | ||
| 2172 | This checks for a -*- mode tag in the buffer's text, checks the | 2172 | To find the right major mode, this function checks for a -*- mode tag, |
| 2173 | interpreter that runs this file against `interpreter-mode-alist', | 2173 | checks if it uses an interpreter listed in `interpreter-mode-alist', |
| 2174 | compares the buffer beginning against `magic-mode-alist', or | 2174 | matches the buffer beginning against `magic-mode-alist', |
| 2175 | compares the filename against the entries in `auto-mode-alist'. | 2175 | compares the filename against the entries in `auto-mode-alist', |
| 2176 | then matches the buffer beginning against `magic-fallback-mode-alist'. | ||
| 2176 | 2177 | ||
| 2177 | It does not check for the `mode:' local variable in the | 2178 | It does not check for the `mode:' local variable in the |
| 2178 | Local Variables section of the file; for that, use `hack-local-variables'. | 2179 | Local Variables section of the file; for that, use `hack-local-variables'. |
| @@ -2181,7 +2182,8 @@ If `enable-local-variables' is nil, this function does not check for a | |||
| 2181 | -*- mode tag. | 2182 | -*- mode tag. |
| 2182 | 2183 | ||
| 2183 | If the optional argument KEEP-MODE-IF-SAME is non-nil, then we | 2184 | If the optional argument KEEP-MODE-IF-SAME is non-nil, then we |
| 2184 | only set the major mode, if that would change it." | 2185 | set the major mode only if that would change it. In other words |
| 2186 | we don't actually set it to the same mode the buffer already has." | ||
| 2185 | ;; Look for -*-MODENAME-*- or -*- ... mode: MODENAME; ... -*- | 2187 | ;; Look for -*-MODENAME-*- or -*- ... mode: MODENAME; ... -*- |
| 2186 | (let (end done mode modes) | 2188 | (let (end done mode modes) |
| 2187 | ;; Find a -*- mode tag | 2189 | ;; Find a -*- mode tag |