diff options
| author | Karoly Lorentey | 2005-05-20 17:44:36 +0000 |
|---|---|---|
| committer | Karoly Lorentey | 2005-05-20 17:44:36 +0000 |
| commit | b4bb3cbc7caca5c9c207d9ed42cacb978790af67 (patch) | |
| tree | 6d347dbb4b2db074171d0bbcb89afe851cffe85b /lispref | |
| parent | 35bc5d82600f330082298823f09f53259a90ea81 (diff) | |
| parent | a18ff9886771c41186eebf8d7984fee2120dbe36 (diff) | |
| download | emacs-b4bb3cbc7caca5c9c207d9ed42cacb978790af67.tar.gz emacs-b4bb3cbc7caca5c9c207d9ed42cacb978790af67.zip | |
Merged from miles@gnu.org--gnu-2005 (patch 69, 313-319)
Patches applied:
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-313
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-314
Merge from gnus--rel--5.10
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-315
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-316
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-317
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-318
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-319
Update from CVS
* miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-69
Update from CVS
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-347
Diffstat (limited to 'lispref')
| -rw-r--r-- | lispref/ChangeLog | 25 | ||||
| -rw-r--r-- | lispref/keymaps.texi | 1 | ||||
| -rw-r--r-- | lispref/modes.texi | 63 |
3 files changed, 61 insertions, 28 deletions
diff --git a/lispref/ChangeLog b/lispref/ChangeLog index 2563f22d36b..ad16fe264f0 100644 --- a/lispref/ChangeLog +++ b/lispref/ChangeLog | |||
| @@ -1,3 +1,28 @@ | |||
| 1 | 2005-05-19 Luc Teirlinck <teirllm@auburn.edu> | ||
| 2 | |||
| 3 | * keymaps.texi (Active Keymaps): Add anchor. | ||
| 4 | |||
| 5 | * modes.texi (Hooks): Delete confusing and unnecessary sentence. | ||
| 6 | (Major Mode Conventions): Refer to `Auto Major Mode' in more | ||
| 7 | appropriate place. | ||
| 8 | (Derived Modes): Small clarifications. | ||
| 9 | (Minor Mode Conventions, Keymaps and Minor Modes): Replace | ||
| 10 | references to nodes with references to anchors. | ||
| 11 | (Mode Line Data): Warn that `(:eval FORM)' should not load any files. | ||
| 12 | Clarify description of lists whose first element is an integer. | ||
| 13 | (Mode Line Variables): Add anchor. | ||
| 14 | (%-Constructs): Clarify description of integer after %. | ||
| 15 | (Emulating Mode Line): Describe nil value for FACE. | ||
| 16 | |||
| 17 | 2005-05-18 Luc Teirlinck <teirllm@auburn.edu> | ||
| 18 | |||
| 19 | * modes.texi (Derived Modes): Correct references to non-existing | ||
| 20 | variable standard-syntax-table. | ||
| 21 | |||
| 22 | 2005-05-17 Lute Kamstra <lute@gnu.org> | ||
| 23 | |||
| 24 | * modes.texi (Defining Minor Modes): Mention the mode hook. | ||
| 25 | |||
| 1 | 2005-05-15 Kim F. Storm <storm@cua.dk> | 26 | 2005-05-15 Kim F. Storm <storm@cua.dk> |
| 2 | 27 | ||
| 3 | * processes.texi (Network): Remove open-network-stream-nowait. | 28 | * processes.texi (Network): Remove open-network-stream-nowait. |
diff --git a/lispref/keymaps.texi b/lispref/keymaps.texi index e1784dd10a0..63832ced1b4 100644 --- a/lispref/keymaps.texi +++ b/lispref/keymaps.texi | |||
| @@ -666,6 +666,7 @@ commands use this function. | |||
| 666 | 666 | ||
| 667 | @c Emacs 19 feature | 667 | @c Emacs 19 feature |
| 668 | @defvar minor-mode-map-alist | 668 | @defvar minor-mode-map-alist |
| 669 | @anchor{Definition of minor-mode-map-alist} | ||
| 669 | This variable is an alist describing keymaps that may or may not be | 670 | This variable is an alist describing keymaps that may or may not be |
| 670 | active according to the values of certain variables. Its elements look | 671 | active according to the values of certain variables. Its elements look |
| 671 | like this: | 672 | like this: |
diff --git a/lispref/modes.texi b/lispref/modes.texi index 9af56fd9d37..1b30a23e128 100644 --- a/lispref/modes.texi +++ b/lispref/modes.texi | |||
| @@ -88,8 +88,7 @@ in Lisp Interaction mode: | |||
| 88 | @end example | 88 | @end example |
| 89 | 89 | ||
| 90 | At the appropriate time, Emacs uses the @code{run-hooks} function to | 90 | At the appropriate time, Emacs uses the @code{run-hooks} function to |
| 91 | run particular hooks. This function calls the hook functions that have | 91 | run particular hooks. |
| 92 | been added with @code{add-hook}. | ||
| 93 | 92 | ||
| 94 | @defun run-hooks &rest hookvars | 93 | @defun run-hooks &rest hookvars |
| 95 | This function takes one or more normal hook variable names as | 94 | This function takes one or more normal hook variable names as |
| @@ -470,13 +469,13 @@ and Buffer List use this feature. | |||
| 470 | @item | 469 | @item |
| 471 | If you want to make the new mode the default for files with certain | 470 | If you want to make the new mode the default for files with certain |
| 472 | recognizable names, add an element to @code{auto-mode-alist} to select | 471 | recognizable names, add an element to @code{auto-mode-alist} to select |
| 473 | the mode for those file names. If you define the mode command to | 472 | the mode for those file names (@pxref{Auto Major Mode}). If you |
| 474 | autoload, you should add this element in the same file that calls | 473 | define the mode command to autoload, you should add this element in |
| 475 | @code{autoload}. If you use an autoload cookie for the mode command, | 474 | the same file that calls @code{autoload}. If you use an autoload |
| 476 | you can also use an autoload cookie for the form that adds the element | 475 | cookie for the mode command, you can also use an autoload cookie for |
| 477 | (@pxref{autoload cookie}). If you do not autoload the mode command, | 476 | the form that adds the element (@pxref{autoload cookie}). If you do |
| 478 | it is sufficient to add the element in the file that contains the mode | 477 | not autoload the mode command, it is sufficient to add the element in |
| 479 | definition. @xref{Auto Major Mode}. | 478 | the file that contains the mode definition. |
| 480 | 479 | ||
| 481 | @item | 480 | @item |
| 482 | In the comments that document the file, you should provide a sample | 481 | In the comments that document the file, you should provide a sample |
| @@ -1001,7 +1000,7 @@ The new mode has its own syntax table, kept in the variable | |||
| 1001 | @code{:syntax-table} keyword (see below). @code{define-derived-mode} | 1000 | @code{:syntax-table} keyword (see below). @code{define-derived-mode} |
| 1002 | makes the parent mode's syntax-table the parent of | 1001 | makes the parent mode's syntax-table the parent of |
| 1003 | @code{@var{variant}-syntax-table}, unless the latter is already set | 1002 | @code{@var{variant}-syntax-table}, unless the latter is already set |
| 1004 | and already has a parent different from @code{standard-syntax-table}. | 1003 | and already has a parent different from the standard syntax table. |
| 1005 | 1004 | ||
| 1006 | @item | 1005 | @item |
| 1007 | The new mode has its own abbrev table, kept in the variable | 1006 | The new mode has its own abbrev table, kept in the variable |
| @@ -1011,13 +1010,13 @@ The new mode has its own abbrev table, kept in the variable | |||
| 1011 | @item | 1010 | @item |
| 1012 | The new mode has its own mode hook, @code{@var{variant}-hook}. It | 1011 | The new mode has its own mode hook, @code{@var{variant}-hook}. It |
| 1013 | runs this hook, after running the hooks of its ancestor modes, with | 1012 | runs this hook, after running the hooks of its ancestor modes, with |
| 1014 | @code{run-mode-hooks} (@pxref{Mode Hooks}). | 1013 | @code{run-mode-hooks}, as the last thing it does. @xref{Mode Hooks}. |
| 1015 | @end itemize | 1014 | @end itemize |
| 1016 | 1015 | ||
| 1017 | In addition, you can specify how to override other aspects of | 1016 | In addition, you can specify how to override other aspects of |
| 1018 | @var{parent} with @var{body}. The command @var{variant} | 1017 | @var{parent} with @var{body}. The command @var{variant} |
| 1019 | evaluates the forms in @var{body} after setting up all its usual | 1018 | evaluates the forms in @var{body} after setting up all its usual |
| 1020 | overrides, just before running @code{@var{variant}-hook}. | 1019 | overrides, just before running the mode hooks. |
| 1021 | 1020 | ||
| 1022 | You can also specify @code{nil} for @var{parent}. This gives the new | 1021 | You can also specify @code{nil} for @var{parent}. This gives the new |
| 1023 | mode no parent. Then @code{define-derived-mode} behaves as described | 1022 | mode no parent. Then @code{define-derived-mode} behaves as described |
| @@ -1039,7 +1038,7 @@ If this is specified, it is the customization group for this mode. | |||
| 1039 | @item :syntax-table | 1038 | @item :syntax-table |
| 1040 | You can use this to explicitly specify a syntax table for the new | 1039 | You can use this to explicitly specify a syntax table for the new |
| 1041 | mode. If you specify a @code{nil} value, the new mode uses the same | 1040 | mode. If you specify a @code{nil} value, the new mode uses the same |
| 1042 | syntax table as @var{parent}, or @code{standard-syntax-table} if | 1041 | syntax table as @var{parent}, or the standard syntax table if |
| 1043 | @var{parent} is @code{nil}. (Note that this does @emph{not} follow | 1042 | @var{parent} is @code{nil}. (Note that this does @emph{not} follow |
| 1044 | the convention used for non-keyword arguments that a @code{nil} value | 1043 | the convention used for non-keyword arguments that a @code{nil} value |
| 1045 | is equivalent with not specifying the argument.) | 1044 | is equivalent with not specifying the argument.) |
| @@ -1262,8 +1261,9 @@ enable or disable the minor mode based on the raw prefix argument value. | |||
| 1262 | 1261 | ||
| 1263 | @item | 1262 | @item |
| 1264 | Add an element to @code{minor-mode-alist} for each minor mode | 1263 | Add an element to @code{minor-mode-alist} for each minor mode |
| 1265 | (@pxref{Mode Line Variables}), if you want to indicate the minor mode in | 1264 | (@pxref{Definition of minor-mode-alist}), if you want to indicate the |
| 1266 | the mode line. This element should be a list of the following form: | 1265 | minor mode in the mode line. This element should be a list of the |
| 1266 | following form: | ||
| 1267 | 1267 | ||
| 1268 | @smallexample | 1268 | @smallexample |
| 1269 | (@var{mode-variable} @var{string}) | 1269 | (@var{mode-variable} @var{string}) |
| @@ -1305,7 +1305,7 @@ should also specify a @code{:set} method which enables the mode by | |||
| 1305 | invoking the mode command. Note in the variable's documentation string that | 1305 | invoking the mode command. Note in the variable's documentation string that |
| 1306 | setting the variable other than via Custom may not take effect. | 1306 | setting the variable other than via Custom may not take effect. |
| 1307 | 1307 | ||
| 1308 | Also mark the definition with an autoload cookie (@pxref{Autoload}), | 1308 | Also mark the definition with an autoload cookie (@pxref{autoload cookie}), |
| 1309 | and specify a @code{:require} so that customizing the variable will load | 1309 | and specify a @code{:require} so that customizing the variable will load |
| 1310 | the library that defines the mode. This will copy suitable definitions | 1310 | the library that defines the mode. This will copy suitable definitions |
| 1311 | into @file{loaddefs.el} so that users can use @code{customize-option} to | 1311 | into @file{loaddefs.el} so that users can use @code{customize-option} to |
| @@ -1334,7 +1334,7 @@ use either \\[customize] or the function `msb-mode'." | |||
| 1334 | 1334 | ||
| 1335 | Each minor mode can have its own keymap, which is active when the mode | 1335 | Each minor mode can have its own keymap, which is active when the mode |
| 1336 | is enabled. To set up a keymap for a minor mode, add an element to the | 1336 | is enabled. To set up a keymap for a minor mode, add an element to the |
| 1337 | alist @code{minor-mode-map-alist}. @xref{Active Keymaps}. | 1337 | alist @code{minor-mode-map-alist}. @xref{Definition of minor-mode-map-alist}. |
| 1338 | 1338 | ||
| 1339 | @cindex @code{self-insert-command}, minor modes | 1339 | @cindex @code{self-insert-command}, minor modes |
| 1340 | One use of minor mode keymaps is to modify the behavior of certain | 1340 | One use of minor mode keymaps is to modify the behavior of certain |
| @@ -1408,9 +1408,10 @@ This is equivalent to specifying @var{keymap} positionally. | |||
| 1408 | Any other keyword arguments are passed passed directly to the | 1408 | Any other keyword arguments are passed passed directly to the |
| 1409 | @code{defcustom} generated for the variable @var{mode}. | 1409 | @code{defcustom} generated for the variable @var{mode}. |
| 1410 | 1410 | ||
| 1411 | The command named @var{mode} finishes by executing the @var{body} forms, | 1411 | The command named @var{mode} first performs the standard actions such |
| 1412 | if any, after it has performed the standard actions such as setting | 1412 | as setting the variable named @var{mode} and then executes the |
| 1413 | the variable named @var{mode}. | 1413 | @var{body} forms, if any. It finishes by running the mode hook |
| 1414 | variable @code{@var{mode}-hook}. | ||
| 1414 | @end defmac | 1415 | @end defmac |
| 1415 | 1416 | ||
| 1416 | @findex easy-mmode-define-minor-mode | 1417 | @findex easy-mmode-define-minor-mode |
| @@ -1627,7 +1628,9 @@ common form of mode-line construct. | |||
| 1627 | 1628 | ||
| 1628 | @item (:eval @var{form}) | 1629 | @item (:eval @var{form}) |
| 1629 | A list whose first element is the symbol @code{:eval} says to evaluate | 1630 | A list whose first element is the symbol @code{:eval} says to evaluate |
| 1630 | @var{form}, and use the result as a string to display. | 1631 | @var{form}, and use the result as a string to display. Make sure this |
| 1632 | evaluation cannot load any files, as doing so could cause infinite | ||
| 1633 | recursion. | ||
| 1631 | 1634 | ||
| 1632 | @item (:propertize @var{elt} @var{props}@dots{}) | 1635 | @item (:propertize @var{elt} @var{props}@dots{}) |
| 1633 | A list whose first element is the symbol @code{:propertize} says to | 1636 | A list whose first element is the symbol @code{:propertize} says to |
| @@ -1649,9 +1652,10 @@ the value of @var{symbol} is @code{nil}. | |||
| 1649 | A list whose first element is an integer specifies truncation or | 1652 | A list whose first element is an integer specifies truncation or |
| 1650 | padding of the results of @var{rest}. The remaining elements | 1653 | padding of the results of @var{rest}. The remaining elements |
| 1651 | @var{rest} are processed recursively as mode-line constructs and | 1654 | @var{rest} are processed recursively as mode-line constructs and |
| 1652 | concatenated together. Then the result is space filled (if | 1655 | concatenated together. When @var{width} is positive, the result is |
| 1653 | @var{width} is positive) or truncated (to @minus{}@var{width} columns, | 1656 | space filled on the right if its width is less than @var{width}. When |
| 1654 | if @var{width} is negative) on the right. | 1657 | @var{width} is negative, the result is truncated on the right to |
| 1658 | @minus{}@var{width} columns if its width exceeds @minus{}@var{width}. | ||
| 1655 | 1659 | ||
| 1656 | For example, the usual way to show what percentage of a buffer is above | 1660 | For example, the usual way to show what percentage of a buffer is above |
| 1657 | the top of the window is to use a list like this: @code{(-3 "%p")}. | 1661 | the top of the window is to use a list like this: @code{(-3 "%p")}. |
| @@ -1817,6 +1821,7 @@ is @code{nil}. | |||
| 1817 | @end defvar | 1821 | @end defvar |
| 1818 | 1822 | ||
| 1819 | @defvar minor-mode-alist | 1823 | @defvar minor-mode-alist |
| 1824 | @anchor{Definition of minor-mode-alist} | ||
| 1820 | This variable holds an association list whose elements specify how the | 1825 | This variable holds an association list whose elements specify how the |
| 1821 | mode line should indicate that a minor mode is active. Each element of | 1826 | mode line should indicate that a minor mode is active. Each element of |
| 1822 | the @code{minor-mode-alist} should be a two-element list: | 1827 | the @code{minor-mode-alist} should be a two-element list: |
| @@ -1888,7 +1893,8 @@ specifies addition of text properties. | |||
| 1888 | 1893 | ||
| 1889 | The following table lists the recognized @code{%}-constructs and what | 1894 | The following table lists the recognized @code{%}-constructs and what |
| 1890 | they mean. In any construct except @samp{%%}, you can add a decimal | 1895 | they mean. In any construct except @samp{%%}, you can add a decimal |
| 1891 | integer after the @samp{%} to specify how many characters to display. | 1896 | integer after the @samp{%} to specify a minimum field width. If the |
| 1897 | width is less, the field is padded with spaces to the right. | ||
| 1892 | 1898 | ||
| 1893 | @table @code | 1899 | @table @code |
| 1894 | @item %b | 1900 | @item %b |
| @@ -1993,7 +1999,7 @@ The value of @code{global-mode-string}. Currently, only | |||
| 1993 | 1999 | ||
| 1994 | Certain text properties are meaningful in the | 2000 | Certain text properties are meaningful in the |
| 1995 | mode line. The @code{face} property affects the appearance of text; the | 2001 | mode line. The @code{face} property affects the appearance of text; the |
| 1996 | @code{help-echo} property associate help strings with the text, and | 2002 | @code{help-echo} property associates help strings with the text, and |
| 1997 | @code{local-map} can make the text mouse-sensitive. | 2003 | @code{local-map} can make the text mouse-sensitive. |
| 1998 | 2004 | ||
| 1999 | There are four ways to specify text properties for text in the mode | 2005 | There are four ways to specify text properties for text in the mode |
| @@ -2061,7 +2067,7 @@ It is normally @code{nil}, so that ordinary buffers have no header line. | |||
| 2061 | 2067 | ||
| 2062 | You can use the function @code{format-mode-line} to compute | 2068 | You can use the function @code{format-mode-line} to compute |
| 2063 | the text that would appear in a mode line or header line | 2069 | the text that would appear in a mode line or header line |
| 2064 | based on certain mode-line specification. | 2070 | based on a certain mode-line specification. |
| 2065 | 2071 | ||
| 2066 | @defun format-mode-line format &optional face window buffer | 2072 | @defun format-mode-line format &optional face window buffer |
| 2067 | This function formats a line of text according to @var{format} as if | 2073 | This function formats a line of text according to @var{format} as if |
| @@ -2077,7 +2083,8 @@ faces, keymaps, etc., that the mode line would have. And any character | |||
| 2077 | for which no @code{face} property is specified gets a default | 2083 | for which no @code{face} property is specified gets a default |
| 2078 | value which is usually @var{face}. (If @var{face} is @code{t}, | 2084 | value which is usually @var{face}. (If @var{face} is @code{t}, |
| 2079 | that stands for either @code{mode-line} if @var{window} is selected, | 2085 | that stands for either @code{mode-line} if @var{window} is selected, |
| 2080 | otherwise @code{mode-line-inactive}.) | 2086 | otherwise @code{mode-line-inactive}. If @var{face} is @code{nil} or |
| 2087 | omitted, that stands for no face property.) | ||
| 2081 | 2088 | ||
| 2082 | However, if @var{face} is an integer, the value has no text properties. | 2089 | However, if @var{face} is an integer, the value has no text properties. |
| 2083 | 2090 | ||