[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/man/major.texi
From: |
Richard M . Stallman |
Subject: |
[Emacs-diffs] Changes to emacs/man/major.texi |
Date: |
Mon, 11 Apr 2005 12:39:50 -0400 |
Index: emacs/man/major.texi
diff -c emacs/man/major.texi:1.9 emacs/man/major.texi:1.10
*** emacs/man/major.texi:1.9 Wed Feb 16 10:08:30 2005
--- emacs/man/major.texi Mon Apr 11 16:39:49 2005
***************
*** 98,103 ****
--- 98,118 ----
@var{mode-function}, Emacs discards the suffix that matched
@var{regexp} and searches the list again for another match.
+ @vindex magic-mode-alist
+ Sometimes the major mode is determined from the way the file's text
+ begins. The variable @code{magic-mode-alist} controls this. Its value
+ is a list of elements of this form:
+
+ @example
+ (@var{regexp} . @var{mode-function})
+ @end example
+
+ @noindent
+ This looks like an element of @code{auto-mode-alist}, but it doesn't work
+ the same: this @var{regexp} is matched against the text at the start
+ of the buffer, not against the file name. @code{magic-mode-alist}
+ takes priority over @code{auto-mode-alist}.
+
You can specify the major mode to use for editing a certain file by
special text in the first nonblank line of the file. The
mode name should appear in this line both preceded and followed by
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] Changes to emacs/man/major.texi,
Richard M . Stallman <=