From: Simon Marshall Date: Fri, 18 Apr 1997 07:08:56 +0000 (+0000) Subject: Cleaned up custom support. X-Git-Tag: emacs-20.1~2438 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=b34aa0a311d74642f5403938939a8cbaac76d5f7;p=emacs.git Cleaned up custom support. --- diff --git a/lisp/fast-lock.el b/lisp/fast-lock.el index 75a5082bc63..efa0e873c24 100644 --- a/lisp/fast-lock.el +++ b/lisp/fast-lock.el @@ -253,7 +253,10 @@ For example: would cause a file's current directory to be used if the file is under your home directory hierarchy, or otherwise the absolute directory `~/.emacs-flc'." - :type '(repeat (radio (cons regexp directory) directory)) + :type '(repeat (radio (cons :tag "Matching" + (regexp :tag "regexp") + (directory :tag "directory")) + (directory :tag "directory"))) :group 'fast-lock) (defcustom fast-lock-minimum-size (* 25 1024) @@ -265,10 +268,17 @@ where MAJOR-MODE is a symbol or t (meaning the default). For example: ((c-mode . 25600) (c++-mode . 25600) (rmail-mode . 1048576)) means that the minimum size is 25K for buffers in C or C++ modes, one megabyte for buffers in Rmail mode, and size is irrelevant otherwise." - :type '(radio (const :tag "None" nil) - (integer :tag "Size") - (repeat (cons (symbol :tag "Major Mode") - (integer :tag "Size")))) + :type '(choice (const :tag "none" nil) + (integer :tag "size") + (repeat :menu-tag "mode specific" :tag "mode specific" + :value ((t . nil)) + (cons :tag "Instance" + (radio :tag "Mode" + (const :tag "all" t) + (symbol :tag "name")) + (radio :tag "Size" + (const :tag "none" nil) + (integer :tag "size"))))) :group 'fast-lock) (defcustom fast-lock-save-events '(kill-buffer kill-emacs) @@ -276,7 +286,9 @@ for buffers in Rmail mode, and size is irrelevant otherwise." Valid events are `save-buffer', `kill-buffer' and `kill-emacs'. If concurrent editing sessions use the same associated cache file for a file's buffer, then you should add `save-buffer' to this list." - :type '(set (const kill-buffer) (const save-buffer) (const kill-emacs)) + :type '(set (const :tag "buffer saving" save-buffer) + (const :tag "buffer killing" kill-buffer) + (const :tag "emacs killing" kill-emacs)) :group 'fast-lock) (defcustom fast-lock-save-others t @@ -289,9 +301,9 @@ Font Lock cache files saved. Ownership may be unknown for networked files." (defcustom fast-lock-verbose font-lock-verbose "*If non-nil, means show status messages for cache processing. If a number, only buffers greater than this size have processing messages." - :type '(radio (const :tag "Never" nil) - (const :tag "Always" t) - (integer :tag "Size")) + :type '(choice (const :tag "never" nil) + (const :tag "always" t) + (integer :tag "size")) :group 'fast-lock) (defvar fast-lock-save-faces diff --git a/lisp/font-lock.el b/lisp/font-lock.el index b7f15dd0ec5..b532edb1eff 100644 --- a/lisp/font-lock.el +++ b/lisp/font-lock.el @@ -199,9 +199,9 @@ (defcustom font-lock-verbose (* 0 1024) "*If non-nil, means show status messages for buffer fontification. If a number, only buffers greater than this size have fontification messages." - :type '(radio (const :tag "Never" nil) - (const :tag "Always" t) - (integer :tag "Size")) + :type '(choice (const :tag "never" nil) + (const :tag "always" t) + (integer :tag "size")) :group 'font-lock) (defcustom font-lock-maximum-decoration t @@ -214,12 +214,19 @@ where MAJOR-MODE is a symbol or t (meaning the default). For example: ((c-mode . t) (c++-mode . 2) (t . 1)) means use the maximum decoration available for buffers in C mode, level 2 decoration for buffers in C++ mode, and level 1 decoration otherwise." - :type '(radio (const :tag "Default" nil) - (const :tag "Maximum" t) - (integer :tag "Level") - (repeat (cons (symbol :tag "Major Mode") - (radio (const :tag "Maximum" t) - (integer :tag "Level"))))) + :type '(choice (const :tag "default" nil) + (const :tag "maximum" t) + (integer :tag "level" 1) + (repeat :menu-tag "mode specific" :tag "mode specific" + :value ((t . t)) + (cons :tag "Instance" + (radio :tag "Mode" + (const :tag "all" t) + (symbol :tag "name")) + (radio :tag "Decoration" + (const :tag "default" nil) + (const :tag "maximum" t) + (integer :tag "level" 1))))) :group 'font-lock) (defcustom font-lock-maximum-size (* 250 1024) @@ -231,10 +238,17 @@ where MAJOR-MODE is a symbol or t (meaning the default). For example: ((c-mode . 256000) (c++-mode . 256000) (rmail-mode . 1048576)) means that the maximum size is 250K for buffers in C or C++ modes, one megabyte for buffers in Rmail mode, and size is irrelevant otherwise." - :type '(radio (const :tag "None" nil) - (integer :tag "Size") - (repeat (cons (symbol :tag "Major Mode") - (integer :tag "Size")))) + :type '(choice (const :tag "none" nil) + (integer :tag "size") + (repeat :menu-tag "mode specific" :tag "mode specific" + :value ((t . nil)) + (cons :tag "Instance" + (radio :tag "Mode" + (const :tag "all" t) + (symbol :tag "name")) + (radio :tag "Size" + (const :tag "none" nil) + (integer :tag "size"))))) :group 'font-lock) ;; Fontification variables: @@ -745,9 +759,12 @@ mode should be automatically turned on. The sense of the list is negated if it begins with `not'. For example: (c-mode c++-mode) means that Font Lock mode is turned on for buffers in C and C++ modes only." - :type '(radio (const :tag "None" nil) - (const :tag "All" t) - (repeat (symbol :tag "Major Mode"))) + :type '(choice (const :tag "none" nil) + (const :tag "all" t) + (set :menu-tag "mode specific" :tag "modes" + :value (not) + (const :tag "Except" not) + (repeat :inline t (symbol :tag "mode")))) :group 'font-lock) ;;;###autoload @@ -829,12 +846,19 @@ means that Fast Lock mode is used to support Font Lock mode for buffers in C or C++ modes, and Lazy Lock mode is used to support Font Lock mode otherwise. The value of this variable is used when Font Lock mode is turned on." - :type '(radio (const :tag "None" nil) - (const :tag "Fast Lock" fast-lock-mode) - (const :tag "Lazy Lock" lazy-lock-mode) - (repeat (cons (symbol :tag "Major Mode") - (radio (const :tag "Fast Lock" fast-lock-mode) - (const :tag "Lazy Lock" lazy-lock-mode))))) + :type '(choice (const :tag "none" nil) + (const :tag "fast lock" fast-lock-mode) + (const :tag "lazy lock" lazy-lock-mode) + (repeat :menu-tag "mode specific" :tag "mode specific" + :value ((t . lazy-lock-mode)) + (cons :tag "Instance" + (radio :tag "Mode" + (const :tag "all" t) + (symbol :tag "name")) + (radio :tag "Decoration" + (const :tag "fast lock" fast-lock-mode) + (const :tag "lazy lock" lazy-lock-mode))) + )) :group 'font-lock) (defvar fast-lock-mode nil) diff --git a/lisp/lazy-lock.el b/lisp/lazy-lock.el index b6fc5ab81bd..5f048d3b75f 100644 --- a/lisp/lazy-lock.el +++ b/lisp/lazy-lock.el @@ -346,10 +346,17 @@ means that the minimum size is 25K for buffers in C or C++ modes, one megabyte for buffers in Rmail mode, and size is irrelevant otherwise. The value of this variable is used when Lazy Lock mode is turned on." - :type '(radio (const :tag "None" nil) - (integer :tag "Size") - (repeat (cons (symbol :tag "Major Mode") - (integer :tag "Size")))) + :type '(choice (const :tag "none" nil) + (integer :tag "size") + (repeat :menu-tag "mode specific" :tag "mode specific" + :value ((t . nil)) + (cons :tag "Instance" + (radio :tag "Mode" + (const :tag "all" t) + (symbol :tag "name")) + (radio :tag "Size" + (const :tag "none" nil) + (integer :tag "size"))))) :group 'lazy-lock) (defcustom lazy-lock-defer-on-the-fly t @@ -364,9 +371,12 @@ means that on-the-fly fontification is deferred for buffers in C and C++ modes only, and deferral does not occur otherwise. The value of this variable is used when Lazy Lock mode is turned on." - :type '(radio (const :tag "Never" nil) - (const :tag "Always" t) - (repeat (symbol :tag "Major Mode"))) + :type '(choice (const :tag "never" nil) + (const :tag "always" t) + (set :menu-tag "mode specific" :tag "modes" + :value (not) + (const :tag "Except" not) + (repeat :inline t (symbol :tag "mode")))) :group 'lazy-lock) (defcustom lazy-lock-defer-on-scrolling nil @@ -389,9 +399,9 @@ become faster. (But, since contextual changes continually occur, such a value makes little sense if `lazy-lock-defer-contextually' is non-nil.) The value of this variable is used when Lazy Lock mode is turned on." - :type '(radio (const :tag "Never" nil) - (const :tag "Always" t) - (const :tag "Eventually" eventually)) + :type '(choice (const :tag "never" nil) + (const :tag "always" t) + (const eventually)) :group 'lazy-lock) (defcustom lazy-lock-defer-contextually 'syntax-driven @@ -407,9 +417,9 @@ fontification occurs only if syntactic fontification is performed using the buffer mode's syntax table, i.e., only if `font-lock-keywords-only' is nil. The value of this variable is used when Lazy Lock mode is turned on." - :type '(radio (const :tag "Never" nil) - (const :tag "Always" t) - (const :tag "Syntax driven" syntax-driven)) + :type '(choice (const :tag "never" nil) + (const :tag "always" t) + (const syntax-driven)) :group 'lazy-lock) (defcustom lazy-lock-defer-time @@ -421,8 +431,8 @@ variables `lazy-lock-defer-on-the-fly', `lazy-lock-defer-on-scrolling' and `lazy-lock-defer-contextually'. The value of this variable is used when Lazy Lock mode is turned on." - :type '(radio (const :tag "Never" nil) - (number :tag "Seconds")) + :type '(choice (const :tag "never" nil) + (number :tag "seconds")) :group 'lazy-lock) (defcustom lazy-lock-stealth-time 30 @@ -431,8 +441,8 @@ Stealth fontification occurs if there is no input within this time. If nil, means stealth fontification is never performed. The value of this variable is used when Lazy Lock mode is turned on." - :type '(radio (const :tag "Never" nil) - (number :tag "Seconds")) + :type '(choice (const :tag "never" nil) + (number :tag "seconds")) :group 'lazy-lock) (defcustom lazy-lock-stealth-lines (if font-lock-maximum-decoration 100 250) @@ -440,7 +450,7 @@ The value of this variable is used when Lazy Lock mode is turned on." Each iteration of stealth fontification can fontify this number of lines. To speed up input response during stealth fontification, at the cost of stealth taking longer to fontify, you could reduce the value of this variable." - :type '(integer :tag "Lines") + :type '(integer :tag "lines") :group 'lazy-lock) (defcustom lazy-lock-stealth-load @@ -454,8 +464,10 @@ If nil, means stealth fontification is never suspended. To reduce machine load during stealth fontification, at the cost of stealth taking longer to fontify, you could reduce the value of this variable. See also `lazy-lock-stealth-nice'." - :type '(radio (const :tag "Never" nil) - (integer :tag "Load")) + :type (if (condition-case nil (load-average) (error)) + '(choice (const :tag "never" nil) + (integer :tag "load")) + '(const :tag "never" nil)) :group 'lazy-lock) (defcustom lazy-lock-stealth-nice @@ -467,8 +479,8 @@ If nil, means stealth fontification is never paused. To reduce machine load during stealth fontification, at the cost of stealth taking longer to fontify, you could increase the value of this variable. See also `lazy-lock-stealth-load'." - :type '(radio (const :tag "Never" nil) - (number :tag "Seconds")) + :type '(choice (const :tag "never" nil) + (number :tag "seconds")) :group 'lazy-lock) (defcustom lazy-lock-stealth-verbose