aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1998-03-02 03:48:45 +0000
committerRichard M. Stallman1998-03-02 03:48:45 +0000
commit02f853b5e31f93a121683f2c4056769bdac07a6f (patch)
tree6fd987e1dc79f3cef2230eb9f973ac6e56f60369
parent8e9caa8f153a2a68d3fa1a462d76f34e99a81829 (diff)
downloademacs-02f853b5e31f93a121683f2c4056769bdac07a6f.tar.gz
emacs-02f853b5e31f93a121683f2c4056769bdac07a6f.zip
Several doc fixes.
-rw-r--r--lisp/generic.el61
1 files changed, 11 insertions, 50 deletions
diff --git a/lisp/generic.el b/lisp/generic.el
index 37059c2c134..ab4b5a7f6fe 100644
--- a/lisp/generic.el
+++ b/lisp/generic.el
@@ -33,26 +33,26 @@
33;; INTRODUCTION: 33;; INTRODUCTION:
34 34
35;; Generic-mode is a meta-mode which can be used to define small modes 35;; Generic-mode is a meta-mode which can be used to define small modes
36;; which provide basic comment and font-lock support. These modes are 36;; which provide basic comment and font-lock support. These modes are
37;; intended for the many configuration files and such which are too small 37;; intended for the many configuration files and such which are too small
38;; for a "real" mode, but still have a regular syntax, comment characters 38;; for a "real" mode, but still have a regular syntax, comment characters
39;; and the like. 39;; and the like.
40;; 40;;
41;; Each generic mode can define the following: 41;; Each generic mode can define the following:
42;; 42;;
43;; * List of comment-characters. The entries in this list should be 43;; * List of comment-characters. The entries in this list should be
44;; either a character, a one or two character string or a cons pair. 44;; either a character, a one or two character string or a cons pair.
45;; If the entry is a character or a one-character string 45;; If the entry is a character or a one-character string
46;; LIMITATIONS: Emacs does not support comment strings of more than 46;; LIMITATIONS: Emacs does not support comment strings of more than
47;; two characters in length. 47;; two characters in length.
48;; 48;;
49;; * List of keywords to font-lock. Each keyword should be a string. 49;; * List of keywords to font-lock. Each keyword should be a string.
50;; If you have additional keywords which should be highlighted in a face 50;; If you have additional keywords which should be highlighted in a face
51;; different from 'font-lock-keyword-face', you can use the convenience 51;; different from 'font-lock-keyword-face', you can use the convenience
52;; function 'generic-make-keywords-list' (which see), and add the 52;; function 'generic-make-keywords-list' (which see), and add the
53;; result to the following list: 53;; result to the following list:
54;; 54;;
55;; * Additional expressions to font-lock. This should be a list of 55;; * Additional expressions to font-lock. This should be a list of
56;; expressions, each of which should be of the same form 56;; expressions, each of which should be of the same form
57;; as those in 'font-lock-defaults-alist'. 57;; as those in 'font-lock-defaults-alist'.
58;; 58;;
@@ -88,7 +88,7 @@
88;; (list 'foo-setup-function)) 88;; (list 'foo-setup-function))
89;; 89;;
90;; defines a new generic-mode 'foo-generic-mode', which has '%' as a 90;; defines a new generic-mode 'foo-generic-mode', which has '%' as a
91;; comment character, and "keyword" as a keyword. When files which end in 91;; comment character, and "keyword" as a keyword. When files which end in
92;; '.FOO' are loaded, Emacs will go into foo-generic-mode and call 92;; '.FOO' are loaded, Emacs will go into foo-generic-mode and call
93;; foo-setup-function. You can also use the function 'foo-generic-mode' 93;; foo-setup-function. You can also use the function 'foo-generic-mode'
94;; (which is interactive) to put a buffer into foo-generic-mode. 94;; (which is interactive) to put a buffer into foo-generic-mode.
@@ -97,15 +97,15 @@
97;; 97;;
98;; Generic-mode provides a hook which automatically puts a 98;; Generic-mode provides a hook which automatically puts a
99;; file into default-generic-mode if the first few lines of a file in 99;; file into default-generic-mode if the first few lines of a file in
100;; fundamental mode start with a hash comment character. To disable 100;; fundamental mode start with a hash comment character. To disable
101;; this functionality, set the variable 'generic-use-find-file-hook' 101;; this functionality, set the variable 'generic-use-find-file-hook'
102;; to nil BEFORE loading generic-mode. See the variables 102;; to nil BEFORE loading generic-mode. See the variables
103;; 'generic-lines-to-scan' and 'generic-find-file-regexp' for customization 103;; 'generic-lines-to-scan' and 'generic-find-file-regexp' for customization
104;; options. 104;; options.
105;; 105;;
106;; GOTCHAS: 106;; GOTCHAS:
107;; 107;;
108;; Be careful that your font-lock definitions are correct. Getting them 108;; Be careful that your font-lock definitions are correct. Getting them
109;; wrong can cause emacs to continually attempt to fontify! This problem 109;; wrong can cause emacs to continually attempt to fontify! This problem
110;; is not specific to generic-mode. 110;; is not specific to generic-mode.
111;; 111;;
@@ -113,42 +113,6 @@
113;; Credit for suggestions, brainstorming, patches and bug-fixes: 113;; Credit for suggestions, brainstorming, patches and bug-fixes:
114;; ACorreir@pervasive-sw.com (Alfred Correira) 114;; ACorreir@pervasive-sw.com (Alfred Correira)
115 115
116;;; Change log:
117;; $Log: generic.el,v $
118;; Revision 1.2 1997/12/12 16:53:45 fx
119;; Use imenu-case-fold-search.
120;;
121;; Revision 1.1 1997/06/15 07:01:26 rms
122;; Initial revision
123;;
124;; Revision 1.6 1996/11/01 17:27:47 peter
125;; Changed the function generic-function-name to return a string instead
126;; of a symbol. Generic-mode now uses this for the mode's name
127;;
128;; Revision 1.5 1996/11/01 16:45:20 peter
129;; Added GPL and LCD information.
130;; Updated documentation
131;; Added generic-find-file-regexp variable
132;; Added generic-make-keywords-list function
133;;
134;; Revision 1.4 1996/10/19 12:16:59 peter
135;; Small bug fixes: fontlock -> font-lock
136;; New entries are added to the end of auto-mode-alist
137;; Generic-font-lock-defaults are set to nil, not (list nil)
138;; Comment-regexp in generic-mode-find-file-hook changed to allow optional
139;; blank lines
140;;
141;; Revision 1.3 1996/10/17 08:24:25 peter
142;; Added generic-mode-find-file-hook and associated variables
143;;
144;; Revision 1.2 1996/10/17 01:00:45 peter
145;; Moved from a data-centered approach (generic-mode-alist) to
146;; a function-based one (define-generic-mode)
147;;
148;; Revision 1.1 1996/10/10 11:37:36 peter
149;; Initial revision
150;;
151
152;;; Code: 116;;; Code:
153 117
154;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 118;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@@ -266,12 +230,11 @@ in the list should have the same form as an entry in `font-lock-defaults-alist'
266 230
267AUTO-MODE-LIST is a list of regular expressions to add to auto-mode-alist. 231AUTO-MODE-LIST is a list of regular expressions to add to auto-mode-alist.
268These regexps are added to auto-mode-alist as soon as `define-generic-mode' 232These regexps are added to auto-mode-alist as soon as `define-generic-mode'
269is called; any old regexps with the same name are removed. To modify the 233is called; any old regexps with the same name are removed.
270auto-mode-alist expressions, use `alter-generic-mode-auto-mode' (which see).
271 234
272FUNCTION-LIST is a list of functions to call to do some additional setup. 235FUNCTION-LIST is a list of functions to call to do some additional setup.
273 236
274See the file generic-extras.el for some examples of `define-generic-mode'." 237See the file generic-x.el for some examples of `define-generic-mode'."
275 238
276 ;; Basic sanity check 239 ;; Basic sanity check
277 (generic-mode-sanity-check name 240 (generic-mode-sanity-check name
@@ -388,9 +351,7 @@ for files which are too small to warrant their own mode, but have
388comment characters, keywords, and the like. 351comment characters, keywords, and the like.
389 352
390To define a generic-mode, use the function `define-generic-mode'. 353To define a generic-mode, use the function `define-generic-mode'.
391To alter an existing generic-mode, use the `alter-generic-mode-' 354Some generic modes are defined in `generic-x.el'."
392convenience functions.
393Some generic modes are defined in generic-extras.el"
394 (interactive 355 (interactive
395 (list (generic-read-type))) 356 (list (generic-read-type)))
396 (generic-mode-with-type (intern type))) 357 (generic-mode-with-type (intern type)))