aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorLute Kamstra2005-04-29 13:12:26 +0000
committerLute Kamstra2005-04-29 13:12:26 +0000
commit74919c6f6a62a12b7dafdb344e27c57a67b80192 (patch)
treebd352c20588b1a0e987ff747f1c0553962e40e56 /lisp
parent010a33862de4caa0d9431ec2a4f07bf61ff76d1c (diff)
downloademacs-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.el66
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
124MODE is the name of the command for the generic mode; it need not 124MODE is the name of the command for the generic mode; don't quote
125be quoted. The optional DOCSTRING is the documentation for the 125it. The optional DOCSTRING is the documentation for the mode
126mode command. If you do not supply it, a default documentation 126command. If you do not supply it, `define-generic-mode' uses a
127string will be used instead. 127default documentation string instead.
128 128
129COMMENT-LIST is a list, whose entries are either a single 129COMMENT-LIST is a list in which each element is either a
130character, a one or two character string or a cons pair. If the 130character, a string of one or two characters, or a cons cell. A
131entry is a character or a string, it is added to the mode's 131character or a string is set up in the mode's syntax table as a
132syntax table with \"comment starter\" syntax. If the entry is a 132\"comment starter\". If the entry is a cons cell, the `car' is
133cons pair, the elements of the pair are considered to be 133set up as a \"comment starter\" and the `cdr' as a \"comment
134\"comment starter\" and \"comment ender\" respectively. (The 134ender\". (Use nil for the latter if you want comments to end at
135latter should be nil if you want comments to end at end of line.) 135the end of the line.) Note that the syntax table has limitations
136Note that Emacs has limitations regarding comment characters. 136about what comment starters and enders are actually possible.
137 137
138KEYWORD-LIST is a list of keywords to highlight with 138KEYWORD-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
141FONT-LOCK-LIST is a list of additional expressions to highlight. 141FONT-LOCK-LIST is a list of additional expressions to highlight.
142Each entry in the list should have the same form as an entry in 142Each element of this list should have the same form as an element
143`font-lock-keywords'. 143of `font-lock-keywords'.
144 144
145AUTO-MODE-LIST is a list of regular expressions to add to 145AUTO-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
147as `define-generic-mode' is called. 147Emacs runs the macro expansion.
148 148
149FUNCTION-LIST is a list of functions to call to do some 149FUNCTION-LIST is a list of functions to call to do some
150additional setup. The mode command calls these functions just 150additional setup. The mode command calls these functions just
151before it runs the mode hook. 151before it runs the mode hook.
152 152
153The optional CUSTOM-KEYWORD-ARGS are pairs of keywords and 153The optional CUSTOM-KEYWORD-ARGS are pairs of keywords and values
154values. They are passed to the generated `defcustom' form of the 154to include in the generated `defcustom' form for the mode hook
155mode hook variable MODE-hook. The default value for the `:group' 155variable `MODE-hook'. The default value for the `:group' keyword
156keyword is MODE without the possible trailing \"-mode\". (Don't 156is MODE with the final \"-mode\" (if any) removed. (Don't use
157use this default group name unless you have written a `defgroup' 157this default group name unless you have written a `defgroup' to
158to define that group properly.) You can specify keyword 158define that group properly.) You can specify keyword arguments
159arguments without specifying a docstring. 159without specifying a docstring.
160 160
161See the file generic-x.el for some examples of `define-generic-mode'." 161See 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