changeset 17507:fd87760f20cd

Cleaned up custom support.
author Simon Marshall <simon@gnu.org>
date Fri, 18 Apr 1997 07:08:56 +0000
parents 3c0b3d55c1bc
children 1c2392208ad9
files lisp/fast-lock.el lisp/font-lock.el lisp/lazy-lock.el
diffstat 3 files changed, 101 insertions(+), 53 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/fast-lock.el	Fri Apr 18 02:54:33 1997 +0000
+++ b/lisp/fast-lock.el	Fri Apr 18 07:08:56 1997 +0000
@@ -253,7 +253,10 @@
 
 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 @@
  ((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 @@
 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 @@
 (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
--- a/lisp/font-lock.el	Fri Apr 18 02:54:33 1997 +0000
+++ b/lisp/font-lock.el	Fri Apr 18 07:08:56 1997 +0000
@@ -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 @@
  ((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 @@
  ((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 @@
 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 @@
 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)
--- a/lisp/lazy-lock.el	Fri Apr 18 02:54:33 1997 +0000
+++ b/lisp/lazy-lock.el	Fri Apr 18 07:08:56 1997 +0000
@@ -346,10 +346,17 @@
 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 @@
 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 @@
 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 @@
 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 @@
 `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 @@
 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 @@
 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 @@
 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 @@
 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