emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/man/major.texi,v


From: Kim F. Storm
Subject: [Emacs-diffs] Changes to emacs/man/major.texi,v
Date: Tue, 19 Dec 2006 09:14:00 +0000

CVSROOT:        /cvsroot/emacs
Module name:    emacs
Changes by:     Kim F. Storm <kfstorm>  06/12/19 09:14:00

Index: major.texi
===================================================================
RCS file: /cvsroot/emacs/emacs/man/major.texi,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -b -r1.14 -r1.15
--- major.texi  5 Feb 2006 22:41:31 -0000       1.14
+++ major.texi  19 Dec 2006 09:14:00 -0000      1.15
@@ -102,17 +102,21 @@
 @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:
+is a list of elements of these forms:
 
 @example
 (@var{regexp} . @var{mode-function})
+(@var{match-function} . @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}.
+The first form 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.  Likewise, the
+second form calls @var{match-function} at the beginning of the buffer,
+and if the function returns address@hidden, the @var{mode-function} is
+called.  @code{magic-mode-alist} takes priority over
address@hidden
 
   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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]