aboutsummaryrefslogtreecommitdiffhomepage
path: root/generic/proof.el
diff options
context:
space:
mode:
authorGravatar David Aspinall <da@inf.ed.ac.uk>2000-05-01 18:29:26 +0000
committerGravatar David Aspinall <da@inf.ed.ac.uk>2000-05-01 18:29:26 +0000
commitdfeca5a2b6738b2d27f993fb2c3c8493a255df66 (patch)
tree72512cd3c3f1ac06374a97524aaf09cf48ad9230 /generic/proof.el
parent6eade6d25c1cfba2be191f01aed62495ef2eb082 (diff)
Helper macros.
Diffstat (limited to 'generic/proof.el')
-rw-r--r--generic/proof.el13
1 files changed, 13 insertions, 0 deletions
diff --git a/generic/proof.el b/generic/proof.el
index bab2d3d0..ab51aa1e 100644
--- a/generic/proof.el
+++ b/generic/proof.el
@@ -194,6 +194,19 @@ It was constructed with the macro proof-customize-toggle.")
(if (null arg) (not ,var)
(> (prefix-numeric-value arg) 0)))))
+;; FIXME: combine this with above, and remove messing calls in
+;; proof-script.
+;; FIXME: rather broken wrt to ARG.
+(defmacro proof-deftoggle (var)
+ "Define a function VAR-toggle to be a toggler for variable VAR.
+See proof-customize-toggle."
+ `(defun ,(intern (concat (symbol-name var) "-toggle")) (arg)
+ (interactive "P")
+ (customize-set-variable
+ (quote ,var)
+ (if (null arg) (not ,var)
+ (> (prefix-numeric-value arg) 0)))))
+
(defun proof-try-require (symbol)
"Try requiring SYMBOL. No error if the file for SYMBOL isn't found."
(condition-case ()