Mercurial > emacs
comparison lisp/font-lock.el @ 17507:fd87760f20cd
Cleaned up custom support.
author | Simon Marshall <simon@gnu.org> |
---|---|
date | Fri, 18 Apr 1997 07:08:56 +0000 |
parents | 83dabcc0a796 |
children | 9b75a01e03e5 |
comparison
equal
deleted
inserted
replaced
17506:3c0b3d55c1bc | 17507:fd87760f20cd |
---|---|
197 ;; User variables. | 197 ;; User variables. |
198 | 198 |
199 (defcustom font-lock-verbose (* 0 1024) | 199 (defcustom font-lock-verbose (* 0 1024) |
200 "*If non-nil, means show status messages for buffer fontification. | 200 "*If non-nil, means show status messages for buffer fontification. |
201 If a number, only buffers greater than this size have fontification messages." | 201 If a number, only buffers greater than this size have fontification messages." |
202 :type '(radio (const :tag "Never" nil) | 202 :type '(choice (const :tag "never" nil) |
203 (const :tag "Always" t) | 203 (const :tag "always" t) |
204 (integer :tag "Size")) | 204 (integer :tag "size")) |
205 :group 'font-lock) | 205 :group 'font-lock) |
206 | 206 |
207 (defcustom font-lock-maximum-decoration t | 207 (defcustom font-lock-maximum-decoration t |
208 "*Maximum decoration level for fontification. | 208 "*Maximum decoration level for fontification. |
209 If nil, use the default decoration (typically the minimum available). | 209 If nil, use the default decoration (typically the minimum available). |
212 If a list, each element should be a cons pair of the form (MAJOR-MODE . LEVEL), | 212 If a list, each element should be a cons pair of the form (MAJOR-MODE . LEVEL), |
213 where MAJOR-MODE is a symbol or t (meaning the default). For example: | 213 where MAJOR-MODE is a symbol or t (meaning the default). For example: |
214 ((c-mode . t) (c++-mode . 2) (t . 1)) | 214 ((c-mode . t) (c++-mode . 2) (t . 1)) |
215 means use the maximum decoration available for buffers in C mode, level 2 | 215 means use the maximum decoration available for buffers in C mode, level 2 |
216 decoration for buffers in C++ mode, and level 1 decoration otherwise." | 216 decoration for buffers in C++ mode, and level 1 decoration otherwise." |
217 :type '(radio (const :tag "Default" nil) | 217 :type '(choice (const :tag "default" nil) |
218 (const :tag "Maximum" t) | 218 (const :tag "maximum" t) |
219 (integer :tag "Level") | 219 (integer :tag "level" 1) |
220 (repeat (cons (symbol :tag "Major Mode") | 220 (repeat :menu-tag "mode specific" :tag "mode specific" |
221 (radio (const :tag "Maximum" t) | 221 :value ((t . t)) |
222 (integer :tag "Level"))))) | 222 (cons :tag "Instance" |
223 (radio :tag "Mode" | |
224 (const :tag "all" t) | |
225 (symbol :tag "name")) | |
226 (radio :tag "Decoration" | |
227 (const :tag "default" nil) | |
228 (const :tag "maximum" t) | |
229 (integer :tag "level" 1))))) | |
223 :group 'font-lock) | 230 :group 'font-lock) |
224 | 231 |
225 (defcustom font-lock-maximum-size (* 250 1024) | 232 (defcustom font-lock-maximum-size (* 250 1024) |
226 "*Maximum size of a buffer for buffer fontification. | 233 "*Maximum size of a buffer for buffer fontification. |
227 Only buffers less than this can be fontified when Font Lock mode is turned on. | 234 Only buffers less than this can be fontified when Font Lock mode is turned on. |
229 If a list, each element should be a cons pair of the form (MAJOR-MODE . SIZE), | 236 If a list, each element should be a cons pair of the form (MAJOR-MODE . SIZE), |
230 where MAJOR-MODE is a symbol or t (meaning the default). For example: | 237 where MAJOR-MODE is a symbol or t (meaning the default). For example: |
231 ((c-mode . 256000) (c++-mode . 256000) (rmail-mode . 1048576)) | 238 ((c-mode . 256000) (c++-mode . 256000) (rmail-mode . 1048576)) |
232 means that the maximum size is 250K for buffers in C or C++ modes, one megabyte | 239 means that the maximum size is 250K for buffers in C or C++ modes, one megabyte |
233 for buffers in Rmail mode, and size is irrelevant otherwise." | 240 for buffers in Rmail mode, and size is irrelevant otherwise." |
234 :type '(radio (const :tag "None" nil) | 241 :type '(choice (const :tag "none" nil) |
235 (integer :tag "Size") | 242 (integer :tag "size") |
236 (repeat (cons (symbol :tag "Major Mode") | 243 (repeat :menu-tag "mode specific" :tag "mode specific" |
237 (integer :tag "Size")))) | 244 :value ((t . nil)) |
245 (cons :tag "Instance" | |
246 (radio :tag "Mode" | |
247 (const :tag "all" t) | |
248 (symbol :tag "name")) | |
249 (radio :tag "Size" | |
250 (const :tag "none" nil) | |
251 (integer :tag "size"))))) | |
238 :group 'font-lock) | 252 :group 'font-lock) |
239 | 253 |
240 ;; Fontification variables: | 254 ;; Fontification variables: |
241 | 255 |
242 (defvar font-lock-keywords nil | 256 (defvar font-lock-keywords nil |
743 If a list, it should be a list of `major-mode' symbol names for which Font Lock | 757 If a list, it should be a list of `major-mode' symbol names for which Font Lock |
744 mode should be automatically turned on. The sense of the list is negated if it | 758 mode should be automatically turned on. The sense of the list is negated if it |
745 begins with `not'. For example: | 759 begins with `not'. For example: |
746 (c-mode c++-mode) | 760 (c-mode c++-mode) |
747 means that Font Lock mode is turned on for buffers in C and C++ modes only." | 761 means that Font Lock mode is turned on for buffers in C and C++ modes only." |
748 :type '(radio (const :tag "None" nil) | 762 :type '(choice (const :tag "none" nil) |
749 (const :tag "All" t) | 763 (const :tag "all" t) |
750 (repeat (symbol :tag "Major Mode"))) | 764 (set :menu-tag "mode specific" :tag "modes" |
765 :value (not) | |
766 (const :tag "Except" not) | |
767 (repeat :inline t (symbol :tag "mode")))) | |
751 :group 'font-lock) | 768 :group 'font-lock) |
752 | 769 |
753 ;;;###autoload | 770 ;;;###autoload |
754 (defun global-font-lock-mode (&optional arg message) | 771 (defun global-font-lock-mode (&optional arg message) |
755 "Toggle Global Font Lock mode. | 772 "Toggle Global Font Lock mode. |
827 ((c-mode . fast-lock-mode) (c++-mode . fast-lock-mode) (t . lazy-lock-mode)) | 844 ((c-mode . fast-lock-mode) (c++-mode . fast-lock-mode) (t . lazy-lock-mode)) |
828 means that Fast Lock mode is used to support Font Lock mode for buffers in C or | 845 means that Fast Lock mode is used to support Font Lock mode for buffers in C or |
829 C++ modes, and Lazy Lock mode is used to support Font Lock mode otherwise. | 846 C++ modes, and Lazy Lock mode is used to support Font Lock mode otherwise. |
830 | 847 |
831 The value of this variable is used when Font Lock mode is turned on." | 848 The value of this variable is used when Font Lock mode is turned on." |
832 :type '(radio (const :tag "None" nil) | 849 :type '(choice (const :tag "none" nil) |
833 (const :tag "Fast Lock" fast-lock-mode) | 850 (const :tag "fast lock" fast-lock-mode) |
834 (const :tag "Lazy Lock" lazy-lock-mode) | 851 (const :tag "lazy lock" lazy-lock-mode) |
835 (repeat (cons (symbol :tag "Major Mode") | 852 (repeat :menu-tag "mode specific" :tag "mode specific" |
836 (radio (const :tag "Fast Lock" fast-lock-mode) | 853 :value ((t . lazy-lock-mode)) |
837 (const :tag "Lazy Lock" lazy-lock-mode))))) | 854 (cons :tag "Instance" |
855 (radio :tag "Mode" | |
856 (const :tag "all" t) | |
857 (symbol :tag "name")) | |
858 (radio :tag "Decoration" | |
859 (const :tag "fast lock" fast-lock-mode) | |
860 (const :tag "lazy lock" lazy-lock-mode))) | |
861 )) | |
838 :group 'font-lock) | 862 :group 'font-lock) |
839 | 863 |
840 (defvar fast-lock-mode nil) | 864 (defvar fast-lock-mode nil) |
841 (defvar lazy-lock-mode nil) | 865 (defvar lazy-lock-mode nil) |
842 | 866 |