aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorStefan Monnier2007-05-16 16:07:15 +0000
committerStefan Monnier2007-05-16 16:07:15 +0000
commit92228a10a24cb72c55b228fb284ba2f6a2aa98c3 (patch)
treed1b35352c85dafb4360d6bb157a9e1296d99ae37 /lisp
parent7dbf4670d9ac3f8438d65d015baf77e9d6585bb3 (diff)
downloademacs-92228a10a24cb72c55b228fb284ba2f6a2aa98c3.tar.gz
emacs-92228a10a24cb72c55b228fb284ba2f6a2aa98c3.zip
(magic-fallback-mode-alist): Rename from file-start-mode-alist.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/files.el10
2 files changed, 10 insertions, 5 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 7268a63fe29..13e5bf4f9a7 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
12007-05-16 Stefan Monnier <monnier@iro.umontreal.ca>
2
3 * files.el (magic-fallback-mode-alist):
4 Rename from file-start-mode-alist.
5
12007-05-16 Nikolaj Schumacher <n_schumacher@web.de> (tiny change) 62007-05-16 Nikolaj Schumacher <n_schumacher@web.de> (tiny change)
2 7
3 * progmodes/compile.el (compilation-handle-exit): Quote first 8 * progmodes/compile.el (compilation-handle-exit): Quote first
diff --git a/lisp/files.el b/lisp/files.el
index a2d9192246a..d022baad9a0 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -2151,7 +2151,7 @@ If FUNCTION is nil, then it is not called. (That is a way of saying
2151\"allow `auto-mode-alist' to decide for these files.\")") 2151\"allow `auto-mode-alist' to decide for these files.\")")
2152(put 'magic-mode-alist 'risky-local-variable t) 2152(put 'magic-mode-alist 'risky-local-variable t)
2153 2153
2154(defvar file-start-mode-alist 2154(defvar magic-fallback-mode-alist
2155 nil 2155 nil
2156 "Like `magic-mode-alist' but has lower priority than `auto-mode-alist'. 2156 "Like `magic-mode-alist' but has lower priority than `auto-mode-alist'.
2157Each element looks like (REGEXP . FUNCTION) or (MATCH-FUNCTION . FUNCTION). 2157Each element looks like (REGEXP . FUNCTION) or (MATCH-FUNCTION . FUNCTION).
@@ -2161,11 +2161,11 @@ call FUNCTION, provided that `magic-mode-alist' and `auto-mode-alist'
2161have not specified a mode for this file. 2161have not specified a mode for this file.
2162 2162
2163If FUNCTION is nil, then it is not called.") 2163If FUNCTION is nil, then it is not called.")
2164(put 'file-start-mode-alist 'risky-local-variable t) 2164(put 'magic-fallback-mode-alist 'risky-local-variable t)
2165 2165
2166(defvar magic-mode-regexp-match-limit 4000 2166(defvar magic-mode-regexp-match-limit 4000
2167 "Upper limit on `magic-mode-alist' regexp matches. 2167 "Upper limit on `magic-mode-alist' regexp matches.
2168Also applies to `file-start-mode-alist'.") 2168Also applies to `magic-fallback-mode-alist'.")
2169 2169
2170(defun set-auto-mode (&optional keep-mode-if-same) 2170(defun set-auto-mode (&optional keep-mode-if-same)
2171 "Select major mode appropriate for current buffer. 2171 "Select major mode appropriate for current buffer.
@@ -2284,7 +2284,7 @@ only set the major mode, if that would change it."
2284 (when mode 2284 (when mode
2285 (set-auto-mode-0 mode keep-mode-if-same) 2285 (set-auto-mode-0 mode keep-mode-if-same)
2286 (setq done t)))))) 2286 (setq done t))))))
2287 ;; Next try matching the buffer beginning against file-start-mode-alist. 2287 ;; Next try matching the buffer beginning against magic-fallback-mode-alist.
2288 (unless done 2288 (unless done
2289 (if (setq done (save-excursion 2289 (if (setq done (save-excursion
2290 (goto-char (point-min)) 2290 (goto-char (point-min))
@@ -2292,7 +2292,7 @@ only set the major mode, if that would change it."
2292 (narrow-to-region (point-min) 2292 (narrow-to-region (point-min)
2293 (min (point-max) 2293 (min (point-max)
2294 (+ (point-min) magic-mode-regexp-match-limit))) 2294 (+ (point-min) magic-mode-regexp-match-limit)))
2295 (assoc-default nil file-start-mode-alist 2295 (assoc-default nil magic-fallback-mode-alist
2296 (lambda (re dummy) 2296 (lambda (re dummy)
2297 (if (functionp re) 2297 (if (functionp re)
2298 (funcall re) 2298 (funcall re)