diff options
| author | Lute Kamstra | 2005-04-29 13:12:26 +0000 |
|---|---|---|
| committer | Lute Kamstra | 2005-04-29 13:12:26 +0000 |
| commit | 74919c6f6a62a12b7dafdb344e27c57a67b80192 (patch) | |
| tree | bd352c20588b1a0e987ff747f1c0553962e40e56 /lisp | |
| parent | 010a33862de4caa0d9431ec2a4f07bf61ff76d1c (diff) | |
| download | emacs-74919c6f6a62a12b7dafdb344e27c57a67b80192.tar.gz emacs-74919c6f6a62a12b7dafdb344e27c57a67b80192.zip | |
Improve commentary section.
(define-generic-mode): Improve docstring.
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/emacs-lisp/generic.el | 66 |
1 files changed, 33 insertions, 33 deletions
diff --git a/lisp/emacs-lisp/generic.el b/lisp/emacs-lisp/generic.el index 60ca75f23b1..03f389aa4d1 100644 --- a/lisp/emacs-lisp/generic.el +++ b/lisp/emacs-lisp/generic.el | |||
| @@ -35,15 +35,15 @@ | |||
| 35 | ;; | 35 | ;; |
| 36 | ;; Each generic mode can define the following: | 36 | ;; Each generic mode can define the following: |
| 37 | ;; | 37 | ;; |
| 38 | ;; * List of comment-characters. The entries in this list should be | 38 | ;; * List of comment-characters. The elements of this list should be |
| 39 | ;; either a character, a one or two character string or a cons pair. | 39 | ;; either a character, a one or two character string, or a cons |
| 40 | ;; If the entry is a character or a string, it is added to the | 40 | ;; cell. If the entry is a character or a string, it is added to |
| 41 | ;; mode's syntax table with `comment-start' syntax. If the entry is | 41 | ;; the mode's syntax table with "comment starter" syntax. If the |
| 42 | ;; a cons pair, the elements of the pair are considered to be | 42 | ;; entry is a cons cell, the `car' and `cdr' of the pair are |
| 43 | ;; `comment-start' and `comment-end' respectively. (The latter | 43 | ;; considered the "comment starter" and "comment ender" |
| 44 | ;; should be nil if you want comments to end at end of line.) | 44 | ;; respectively. (The latter should be nil if you want comments to |
| 45 | ;; LIMITATIONS: Emacs does not support comment strings of more than | 45 | ;; end at the end of the line.) Emacs does not support comment |
| 46 | ;; two characters in length. | 46 | ;; strings of more than two characters in length. |
| 47 | ;; | 47 | ;; |
| 48 | ;; * List of keywords to font-lock. Each keyword should be a string. | 48 | ;; * List of keywords to font-lock. Each keyword should be a string. |
| 49 | ;; If you have additional keywords which should be highlighted in a | 49 | ;; If you have additional keywords which should be highlighted in a |
| @@ -121,42 +121,42 @@ instead (which see).") | |||
| 121 | &rest custom-keyword-args) | 121 | &rest custom-keyword-args) |
| 122 | "Create a new generic mode MODE. | 122 | "Create a new generic mode MODE. |
| 123 | 123 | ||
| 124 | MODE is the name of the command for the generic mode; it need not | 124 | MODE is the name of the command for the generic mode; don't quote |
| 125 | be quoted. The optional DOCSTRING is the documentation for the | 125 | it. The optional DOCSTRING is the documentation for the mode |
| 126 | mode command. If you do not supply it, a default documentation | 126 | command. If you do not supply it, `define-generic-mode' uses a |
| 127 | string will be used instead. | 127 | default documentation string instead. |
| 128 | 128 | ||
| 129 | COMMENT-LIST is a list, whose entries are either a single | 129 | COMMENT-LIST is a list in which each element is either a |
| 130 | character, a one or two character string or a cons pair. If the | 130 | character, a string of one or two characters, or a cons cell. A |
| 131 | entry is a character or a string, it is added to the mode's | 131 | character or a string is set up in the mode's syntax table as a |
| 132 | syntax table with \"comment starter\" syntax. If the entry is a | 132 | \"comment starter\". If the entry is a cons cell, the `car' is |
| 133 | cons pair, the elements of the pair are considered to be | 133 | set up as a \"comment starter\" and the `cdr' as a \"comment |
| 134 | \"comment starter\" and \"comment ender\" respectively. (The | 134 | ender\". (Use nil for the latter if you want comments to end at |
| 135 | latter should be nil if you want comments to end at end of line.) | 135 | the end of the line.) Note that the syntax table has limitations |
| 136 | Note that Emacs has limitations regarding comment characters. | 136 | about what comment starters and enders are actually possible. |
| 137 | 137 | ||
| 138 | KEYWORD-LIST is a list of keywords to highlight with | 138 | KEYWORD-LIST is a list of keywords to highlight with |
| 139 | `font-lock-keyword-face'. Each keyword should be a string. | 139 | `font-lock-keyword-face'. Each keyword should be a string. |
| 140 | 140 | ||
| 141 | FONT-LOCK-LIST is a list of additional expressions to highlight. | 141 | FONT-LOCK-LIST is a list of additional expressions to highlight. |
| 142 | Each entry in the list should have the same form as an entry in | 142 | Each element of this list should have the same form as an element |
| 143 | `font-lock-keywords'. | 143 | of `font-lock-keywords'. |
| 144 | 144 | ||
| 145 | AUTO-MODE-LIST is a list of regular expressions to add to | 145 | AUTO-MODE-LIST is a list of regular expressions to add to |
| 146 | `auto-mode-alist'. These regular expressions are added as soon | 146 | `auto-mode-alist'. These regular expressions are added when |
| 147 | as `define-generic-mode' is called. | 147 | Emacs runs the macro expansion. |
| 148 | 148 | ||
| 149 | FUNCTION-LIST is a list of functions to call to do some | 149 | FUNCTION-LIST is a list of functions to call to do some |
| 150 | additional setup. The mode command calls these functions just | 150 | additional setup. The mode command calls these functions just |
| 151 | before it runs the mode hook. | 151 | before it runs the mode hook. |
| 152 | 152 | ||
| 153 | The optional CUSTOM-KEYWORD-ARGS are pairs of keywords and | 153 | The optional CUSTOM-KEYWORD-ARGS are pairs of keywords and values |
| 154 | values. They are passed to the generated `defcustom' form of the | 154 | to include in the generated `defcustom' form for the mode hook |
| 155 | mode hook variable MODE-hook. The default value for the `:group' | 155 | variable `MODE-hook'. The default value for the `:group' keyword |
| 156 | keyword is MODE without the possible trailing \"-mode\". (Don't | 156 | is MODE with the final \"-mode\" (if any) removed. (Don't use |
| 157 | use this default group name unless you have written a `defgroup' | 157 | this default group name unless you have written a `defgroup' to |
| 158 | to define that group properly.) You can specify keyword | 158 | define that group properly.) You can specify keyword arguments |
| 159 | arguments without specifying a docstring. | 159 | without specifying a docstring. |
| 160 | 160 | ||
| 161 | See the file generic-x.el for some examples of `define-generic-mode'." | 161 | See the file generic-x.el for some examples of `define-generic-mode'." |
| 162 | (declare (debug (sexp def-form def-form def-form form def-form | 162 | (declare (debug (sexp def-form def-form def-form form def-form |
| @@ -180,7 +180,7 @@ See the file generic-x.el for some examples of `define-generic-mode'." | |||
| 180 | 180 | ||
| 181 | (unless (plist-get custom-keyword-args :group) | 181 | (unless (plist-get custom-keyword-args :group) |
| 182 | (setq custom-keyword-args | 182 | (setq custom-keyword-args |
| 183 | (plist-put custom-keyword-args | 183 | (plist-put custom-keyword-args |
| 184 | :group `',(intern (replace-regexp-in-string | 184 | :group `',(intern (replace-regexp-in-string |
| 185 | "-mode\\'" "" name))))) | 185 | "-mode\\'" "" name))))) |
| 186 | 186 | ||