@c -*-texinfo-*-
@c This is part of the GNU Emacs Lisp Reference Manual.
-@c Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1998, 1999, 2003, 2004
-@c Free Software Foundation, Inc.
+@c Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1998, 1999,
+@c 2003, 2004, 2005 Free Software Foundation, Inc.
@c See the file elisp.texi for copying conditions.
@setfilename ../info/modes
@node Modes, Documentation, Keymaps, Top
In this mode, paragraphs are delimited only by blank or white lines.
You can thus get the full benefit of adaptive filling
(see the variable `adaptive-fill-mode').
-\\{text-mode-map}
+\\@{text-mode-map@}
Turning on Text mode runs the normal hook `text-mode-hook'."
@end group
@group
(modify-syntax-entry ?' "' " table)
(modify-syntax-entry ?, "' " table)
@end group
-@end group
@group
;; @r{@dots{}likewise for many other characters@dots{}}
(modify-syntax-entry ?\( "() " table)
(modify-syntax-entry ?\] ")[ " table))
table))
@end group
+@group
;; @r{Create an abbrev table for lisp-mode.}
(define-abbrev-table 'lisp-mode-abbrev-table ())
@end group
@subsection Defining Minor Modes
The macro @code{define-minor-mode} offers a convenient way of
-implementing a mode in one self-contained definition. It supports only
-buffer-local minor modes, not global ones.
+implementing a mode in one self-contained definition.
-@defmac define-minor-mode mode doc [init-value [lighter [keymap keyword-args... body...]]]
+@defmac define-minor-mode mode doc [init-value [lighter [keymap]]] keyword-args... body...
@tindex define-minor-mode
This macro defines a new minor mode whose name is @var{mode} (a
symbol). It defines a command named @var{mode} to toggle the minor
(@var{key-sequence} . @var{definition})
@end example
-The @var{keyword-args} consist of keywords followed by corresponding
-values. A few keywords have special meanings:
+The above three arguments @var{init-value}, @var{lighter}, and
+@var{keymap} can be (partially) omitted when @var{keyword-args} are
+used. The @var{keyword-args} consist of keywords followed by
+corresponding values. A few keywords have special meanings:
@table @code
@item :global @var{global}
buffer, such as its name, associated file, depth of recursive editing,
and major and minor modes. A window can also have a @dfn{header
line}, which is much like the mode line but appears at the top of the
-window (starting in Emacs 21).
+window.
This section describes how to control the contents of the mode line
and header line. We include it in this chapter because much of the
where they appear.
If you set this variable to @code{nil} in a buffer, that buffer does not
-have a mode line. (This feature was added in Emacs 21.)
+have a mode line.
@end defvar
A mode-line construct may be as simple as a fixed string of text, but
@item (:eval @var{form})
A list whose first element is the symbol @code{:eval} says to evaluate
@var{form}, and use the result as a string to display.
-(This feature is new as of Emacs 21.)
@item (:propertize @var{elt} @var{props}@dots{})
A list whose first element is the symbol @code{:propertize} says to
process the mode-line construct @var{elt} recursively and add the text
properties specified by @var{props} to the result. The argument
@var{props} should consist of zero or more pairs @var{text-property}
-@var{value}. (This feature is new as of Emacs 21.4.)
-@c FIXME: This might be Emacs 21.5.
+@var{value}. (This feature is new as of Emacs 22.1.)
@item (@var{symbol} @var{then} @var{else})
A list whose first element is a symbol that is not a keyword specifies a
@subsection Properties in the Mode Line
@cindex text properties in the mode line
- Starting in Emacs 21, certain text properties are meaningful in the
+ Certain text properties are meaningful in the
mode line. The @code{face} property affects the appearance of text; the
@code{help-echo} property associate help strings with the text, and
@code{local-map} can make the text mouse-sensitive.
@cindex header line (of a window)
@cindex window header line
- Starting in Emacs 21, a window can have a @dfn{header line} at the
+ A window can have a @dfn{header line} at the
top, just as it can have a mode line at the bottom. The header line
feature works just like the mode-line feature, except that it's
controlled by different variables.