Mercurial > emacs
changeset 74742:cf3db92fe927
*** empty log message ***
author | Kim F. Storm <storm@cua.dk> |
---|---|
date | Tue, 19 Dec 2006 09:24:45 +0000 |
parents | 53b637f954f2 |
children | 15e2bb4df6d0 |
files | etc/NEWS lisp/ChangeLog man/ChangeLog |
diffstat | 3 files changed, 22 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/etc/NEWS Tue Dec 19 09:14:00 2006 +0000 +++ b/etc/NEWS Tue Dec 19 09:24:45 2006 +0000 @@ -5517,10 +5517,16 @@ ** Major mode mechanism changes: +++ -*** `set-auto-mode' now gives the interpreter magic line (if present) -precedence over the file name. Likewise an `<?xml' or `<!DOCTYPE' -declaration will give the buffer XML or SGML mode, based on the new -variable `magic-mode-alist'. +*** New variable `magic-mode-alist' determines major mode for a file by +looking the file contents. It take precedence over `auto-mode-alist'. + ++++ +*** An interpreter magic line (if present) takes precedence over the +file name when setting the major mode. + ++++ +*** XML or SGML major mode is selected when file starts with an `<?xml' +or `<!DOCTYPE' declaration. +++ *** Use the new function `run-mode-hooks' to run the major mode's mode hook.
--- a/lisp/ChangeLog Tue Dec 19 09:14:00 2006 +0000 +++ b/lisp/ChangeLog Tue Dec 19 09:24:45 2006 +0000 @@ -1,3 +1,10 @@ +2006-12-19 Kim F. Storm <storm@cua.dk> + + * files.el (magic-mode-alist): Allow matching file type by + calling a function at bob. Check for image types by calling + image-type-from-buffer. Suggested by Juanma Barranquero. + (set-auto-mode): Do it. + 2006-12-19 Michael Albinus <michael.albinus@gmx.de> * net/tramp.el (tramp-methods): Introduce new method `scpc'.
--- a/man/ChangeLog Tue Dec 19 09:14:00 2006 +0000 +++ b/man/ChangeLog Tue Dec 19 09:24:45 2006 +0000 @@ -1,3 +1,8 @@ +2006-12-19 Kim F. Storm <storm@cua.dk> + + * major.texi (Choosing Modes): Describe match-function elements for + magic-mode-alist. + 2006-12-19 Michael Albinus <michael.albinus@gmx.de> * tramp.texi (External transfer methods): Describe new method `scpc'.