** Install vc-hooks.el patch from trunk.
-** Move some items from magic-mode-alist to file-start-mode-alist.
+** Move some items from magic-mode-alist to magic-fallback-mode-alist.
** cloos@jhcloos.com, May 11: A redisplay bug in 22.0.99
*** New variable `magic-mode-alist' determines major mode for a file by
looking at the file contents. It takes precedence over `auto-mode-alist'.
-*** New variable `file-start-mode-alist' determines major mode for a file by
+*** New variable `magic-fallback-mode-alist' determines major mode for a file by
looking at the file contents. It is handled after `auto-mode-alist',
only if `auto-mode-alist' (and `magic-mode-alist') says nothing about the file.
+2007-05-16 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * files.el (magic-fallback-mode-alist):
+ Rename from file-start-mode-alist.
+
2007-05-16 Nikolaj Schumacher <n_schumacher@web.de> (tiny change)
* progmodes/compile.el (compilation-handle-exit): Quote first
\"allow `auto-mode-alist' to decide for these files.\")")
(put 'magic-mode-alist 'risky-local-variable t)
-(defvar file-start-mode-alist
+(defvar magic-fallback-mode-alist
nil
"Like `magic-mode-alist' but has lower priority than `auto-mode-alist'.
Each element looks like (REGEXP . FUNCTION) or (MATCH-FUNCTION . FUNCTION).
have not specified a mode for this file.
If FUNCTION is nil, then it is not called.")
-(put 'file-start-mode-alist 'risky-local-variable t)
+(put 'magic-fallback-mode-alist 'risky-local-variable t)
(defvar magic-mode-regexp-match-limit 4000
"Upper limit on `magic-mode-alist' regexp matches.
-Also applies to `file-start-mode-alist'.")
+Also applies to `magic-fallback-mode-alist'.")
(defun set-auto-mode (&optional keep-mode-if-same)
"Select major mode appropriate for current buffer.
(when mode
(set-auto-mode-0 mode keep-mode-if-same)
(setq done t))))))
- ;; Next try matching the buffer beginning against file-start-mode-alist.
+ ;; Next try matching the buffer beginning against magic-fallback-mode-alist.
(unless done
(if (setq done (save-excursion
(goto-char (point-min))
(narrow-to-region (point-min)
(min (point-max)
(+ (point-min) magic-mode-regexp-match-limit)))
- (assoc-default nil file-start-mode-alist
+ (assoc-default nil magic-fallback-mode-alist
(lambda (re dummy)
(if (functionp re)
(funcall re)
@code{auto-mode-alist} gets to decide the mode.
@end defvar
-@defvar file-start-mode-alist
+@defvar magic-fallback-mode-alist
This works like @code{magic-mode-alist}, except that it is handled
only if @code{auto-mode-alist} does not specify a mode for this file.
@end defvar