diff options
| author | Lute Kamstra | 2005-05-12 13:20:56 +0000 |
|---|---|---|
| committer | Lute Kamstra | 2005-05-12 13:20:56 +0000 |
| commit | 28e7aba4fd2bc5e3178ce4a4358722a327808538 (patch) | |
| tree | 62b6a72feebe4cb1f5a44982a4ae5b4301fcbbbc | |
| parent | d4fb185de92d5c4a27e7b15f94217697eca32cda (diff) | |
| download | emacs-28e7aba4fd2bc5e3178ce4a4358722a327808538.tar.gz emacs-28e7aba4fd2bc5e3178ce4a4358722a327808538.zip | |
(Generic Modes): Update.
(Major Modes): Refer to node "Generic Modes".
| -rw-r--r-- | lispref/modes.texi | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/lispref/modes.texi b/lispref/modes.texi index 12c4493b36f..4e6085566c4 100644 --- a/lispref/modes.texi +++ b/lispref/modes.texi | |||
| @@ -71,10 +71,9 @@ it is convenient to use @code{define-derived-mode} with a @code{nil} | |||
| 71 | parent argument, since it automatically enforces the most important | 71 | parent argument, since it automatically enforces the most important |
| 72 | coding conventions for you. | 72 | coding conventions for you. |
| 73 | 73 | ||
| 74 | @findex define-generic-mode | ||
| 75 | For a very simple programming language major mode that handles | 74 | For a very simple programming language major mode that handles |
| 76 | comments and fontification, you can use @code{define-generic-mode} | 75 | comments and fontification, you can use @code{define-generic-mode}. |
| 77 | in @file{generic.el}. | 76 | @xref{Generic Modes}. |
| 78 | 77 | ||
| 79 | Rmail Edit mode offers an example of changing the major mode | 78 | Rmail Edit mode offers an example of changing the major mode |
| 80 | temporarily for a buffer, so it can be edited in a different way (with | 79 | temporarily for a buffer, so it can be edited in a different way (with |
| @@ -873,7 +872,7 @@ configuration files. To define a generic mode, use the macro | |||
| 873 | @code{define-generic-mode}. See the file @file{generic-x.el} for some | 872 | @code{define-generic-mode}. See the file @file{generic-x.el} for some |
| 874 | examples of the use of @code{define-generic-mode}. | 873 | examples of the use of @code{define-generic-mode}. |
| 875 | 874 | ||
| 876 | @defmac define-generic-mode mode comment-list keyword-list font-lock-list auto-mode-list function-list &optional docstring &rest custom-keyword-args | 875 | @defmac define-generic-mode mode comment-list keyword-list font-lock-list auto-mode-list function-list &optional docstring |
| 877 | This macro creates a new generic mode. The argument @var{mode} (an | 876 | This macro creates a new generic mode. The argument @var{mode} (an |
| 878 | unquoted symbol) is the major mode command. The optional argument | 877 | unquoted symbol) is the major mode command. The optional argument |
| 879 | @var{docstring} is the documentation for the mode command. If you do | 878 | @var{docstring} is the documentation for the mode command. If you do |
| @@ -902,16 +901,7 @@ when Emacs runs the macro expansion. | |||
| 902 | 901 | ||
| 903 | @var{function-list} is a list of functions to call to do some | 902 | @var{function-list} is a list of functions to call to do some |
| 904 | additional setup. The mode command calls these functions just before | 903 | additional setup. The mode command calls these functions just before |
| 905 | it runs the mode hook. | 904 | it runs the mode hook variable @code{@var{mode}-hook}. |
| 906 | |||
| 907 | The optional @var{custom-keyword-args} are pairs of keywords and | ||
| 908 | values to include in the generated @code{defcustom} form for the mode | ||
| 909 | hook variable @code{@var{mode}-hook}. The default value for the | ||
| 910 | @samp{:group} keyword is @var{mode} with the final @samp{-mode} (if | ||
| 911 | any) removed. Don't use this default group name unless you have | ||
| 912 | written a @code{defgroup} to define that group properly (@pxref{Group | ||
| 913 | Definitions}). You can specify keyword arguments without specifying a | ||
| 914 | docstring. | ||
| 915 | @end defmac | 905 | @end defmac |
| 916 | 906 | ||
| 917 | @node Mode Hooks | 907 | @node Mode Hooks |