@c -*-texinfo-*-
@c This is part of the GNU Emacs Lisp Reference Manual.
-@c Copyright (C) 1990-1995, 1998-1999, 2001-2013 Free Software
+@c Copyright (C) 1990-1995, 1998-1999, 2001-2014 Free Software
@c Foundation, Inc.
@c See the file elisp.texi for copying conditions.
@node Modes
@defvar interpreter-mode-alist
This variable specifies major modes to use for scripts that specify a
command interpreter in a @samp{#!} line. Its value is an alist with
-elements of the form @code{(@var{interpreter} . @var{mode})}; for
-example, @code{("perl" . perl-mode)} is one element present by
-default. The element says to use mode @var{mode} if the file
-specifies an interpreter which matches @var{interpreter}.
+elements of the form @code{(@var{regexp} . @var{mode})}; this says to
+use mode @var{mode} if the file specifies an interpreter which matches
+@code{\\`@var{regexp}\\'}. For example, one of the default elements
+is @code{("python[0-9.]*" . python-mode)}.
@end defvar
@defvar magic-mode-alist
own definition of @code{self-insert-command} for the standard one. The
editor command loop handles this function specially.)
-The key sequences bound in a minor mode should consist of @kbd{C-c}
-followed by one of @kbd{.,/?`'"[]\|~!#$%^&*()-_+=}. (The other
-punctuation characters are reserved for major modes.)
+Minor modes may bind commands to key sequences consisting of @kbd{C-c}
+followed by a punctuation character. However, sequences consisting of
+@kbd{C-c} followed by one of @kbd{@{@}<>:;}, or a control character or
+digit, are reserved for major modes. Also, @kbd{C-c @var{letter}} is
+reserved for users. @xref{Key Binding Conventions}.
@node Defining Minor Modes
@subsection Defining Minor Modes
This defines a global toggle named @var{global-mode} whose meaning is
to enable or disable the buffer-local minor mode @var{mode} in all
buffers. To turn on the minor mode in a buffer, it uses the function
-@var{turn-on}; to turn off the minor mode, it calls @code{mode} with
+@var{turn-on}; to turn off the minor mode, it calls @var{mode} with
@minus{}1 as argument.
Globally enabling the mode also affects buffers subsequently created
characters which have no @code{face} properties are displayed, by
default, in the face @code{mode-line} or @code{mode-line-inactive}
(@pxref{Standard Faces,,, emacs, The GNU Emacs Manual}). The
-@code{help-echo} and @code{local-map} properties in @var{string} have
+@code{help-echo} and @code{keymap} properties in @var{string} have
special meanings. @xref{Properties in Mode}.
@item @var{symbol}
Certain text properties are meaningful in the
mode line. The @code{face} property affects the appearance of text; the
@code{help-echo} property associates help strings with the text, and
-@code{local-map} can make the text mouse-sensitive.
+@code{keymap} can make the text mouse-sensitive.
There are four ways to specify text properties for text in the mode
line:
property.
@end enumerate
- You can use the @code{local-map} property to specify a keymap. This
+ You can use the @code{keymap} property to specify a keymap. This
keymap only takes real effect for mouse clicks; binding character keys
and function keys to it has no effect, since it is impossible to move
point into the mode line.
A nested sub-alist element looks like this:
@example
-(@var{menu-title} @var{sub-alist})
+(@var{menu-title} . @var{sub-alist})
@end example
It creates the submenu @var{menu-title} specified by @var{sub-alist}.
@node SMIE
@subsection Simple Minded Indentation Engine
+@cindex SMIE
SMIE is a package that provides a generic navigation and indentation
engine. Based on a very simple parser using an ``operator precedence
@node SMIE Grammar
@subsubsection Defining the Grammar of a Language
+@cindex SMIE grammar
+@cindex grammar, SMIE
The usual way to define the SMIE grammar of a language is by
defining a new global variable that holds the precedence table by
@node SMIE Lexer
@subsubsection Defining Tokens
+@cindex SMIE lexer
+@cindex defining tokens, SMIE
SMIE comes with a predefined lexical analyzer which uses syntax tables
in the following way: any sequence of characters that have word or
@node SMIE Indentation
@subsubsection Specifying Indentation Rules
+@cindex indentation rules, SMIE
Based on the provided grammar, SMIE will be able to provide automatic
indentation without any extra effort. But in practice, this default