aboutsummaryrefslogtreecommitdiff
path: root/generic/proof.el
diff options
context:
space:
mode:
authorDavid Aspinall1999-11-10 15:06:10 +0000
committerDavid Aspinall1999-11-10 15:06:10 +0000
commitb6ee01566a369020d4ad3d97d3c4556bd064ba5f (patch)
treef11df91aa1d41a34ff6d399c7e745c2081ca0adc /generic/proof.el
parentea5b39e9612becdd529881901a811619e6fb5e4c (diff)
Reorganized user options. Special new code for boolean settings.
Diffstat (limited to 'generic/proof.el')
-rw-r--r--generic/proof.el19
1 files changed, 17 insertions, 2 deletions
diff --git a/generic/proof.el b/generic/proof.el
index df94cb91..90813468 100644
--- a/generic/proof.el
+++ b/generic/proof.el
@@ -21,8 +21,6 @@
;; cl is dumped with my XEmacs 20.4, but not FSF Emacs 20.2.
(require 'cl)
-
-
(require 'proof-config) ; configuration variables
(require 'proof-splash) ; display splash screen
@@ -148,6 +146,11 @@ read.")
;;; Utilities/macros used in several files (-> proof-utils)
;;;
+;;
+;;
+
+
+
;; -----------------------------------------------------------------
;; Handy macros
@@ -157,6 +160,18 @@ read.")
(with-current-buffer ,buf
,@body)))
+(defmacro proof-customize-toggle (var)
+ "Make a function for toggling a boolean customize setting VAR."
+ `(lambda (arg)
+ ,(concat "Toggle " (symbol-name var) ". With ARG, turn on iff ARG>0.
+This function simply uses customize-set-variable to set the variable.
+It was constructed with the macro proof-customize-toggle.")
+ (interactive "P")
+ (customize-set-variable
+ (quote ,var)
+ (if (null arg) (not ,var)
+ (> (prefix-numeric-value arg) 0)))))
+
;; -----------------------------------------------------------------
;; Buffers and filenames