/[emacs]/emacs/man/major.texi
ViewVC logotype

Diff of /emacs/man/major.texi

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.9 by rms, Wed Feb 16 10:08:30 2005 UTC revision 1.10 by rms, Mon Apr 11 16:39:49 2005 UTC
# Line 98  the element has the form @code{(@var{reg Line 98  the element has the form @code{(@var{reg
98  @var{mode-function}, Emacs discards the suffix that matched  @var{mode-function}, Emacs discards the suffix that matched
99  @var{regexp} and searches the list again for another match.  @var{regexp} and searches the list again for another match.
100    
101    @vindex magic-mode-alist
102      Sometimes the major mode is determined from the way the file's text
103    begins.  The variable @code{magic-mode-alist} controls this.  Its value
104    is a list of elements of this form:
105    
106    @example
107    (@var{regexp} . @var{mode-function})
108    @end example
109    
110    @noindent
111    This looks like an element of @code{auto-mode-alist}, but it doesn't work
112    the same: this @var{regexp} is matched against the text at the start
113    of the buffer, not against the file name.  @code{magic-mode-alist}
114    takes priority over @code{auto-mode-alist}.
115    
116    You can specify the major mode to use for editing a certain file by    You can specify the major mode to use for editing a certain file by
117  special text in the first nonblank line of the file.  The  special text in the first nonblank line of the file.  The
118  mode name should appear in this line both preceded and followed by  mode name should appear in this line both preceded and followed by

Legend:
Removed from v.1.9  
changed lines
  Added in v.1.10

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26