Mercurial > emacs
changeset 77725:2f4cc000e4de
(magic-fallback-mode-alist): Rename from file-start-mode-alist.
author | Stefan Monnier <monnier@iro.umontreal.ca> |
---|---|
date | Wed, 16 May 2007 16:07:15 +0000 |
parents | 5dcc9b2e0947 |
children | f0732d60c635 |
files | admin/FOR-RELEASE etc/NEWS lisp/ChangeLog lisp/files.el lispref/modes.texi |
diffstat | 5 files changed, 13 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/admin/FOR-RELEASE Wed May 16 15:37:45 2007 +0000 +++ b/admin/FOR-RELEASE Wed May 16 16:07:15 2007 +0000 @@ -52,7 +52,7 @@ ** 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
--- a/etc/NEWS Wed May 16 15:37:45 2007 +0000 +++ b/etc/NEWS Wed May 16 16:07:15 2007 +0000 @@ -5013,7 +5013,7 @@ *** 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.
--- a/lisp/ChangeLog Wed May 16 15:37:45 2007 +0000 +++ b/lisp/ChangeLog Wed May 16 16:07:15 2007 +0000 @@ -1,3 +1,8 @@ +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
--- a/lisp/files.el Wed May 16 15:37:45 2007 +0000 +++ b/lisp/files.el Wed May 16 16:07:15 2007 +0000 @@ -2151,7 +2151,7 @@ \"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). @@ -2161,11 +2161,11 @@ 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. @@ -2284,7 +2284,7 @@ (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)) @@ -2292,7 +2292,7 @@ (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)
--- a/lispref/modes.texi Wed May 16 15:37:45 2007 +0000 +++ b/lispref/modes.texi Wed May 16 16:07:15 2007 +0000 @@ -616,7 +616,7 @@ @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