aboutsummaryrefslogtreecommitdiff
path: root/generic/proof-utils.el
diff options
context:
space:
mode:
authorDavid Aspinall2011-01-11 17:06:15 +0000
committerDavid Aspinall2011-01-11 17:06:15 +0000
commitda65048c208361c704c6a2c200a7553a83f191a0 (patch)
treec22d65e6d3d59ed19bf980806875963b0ffcc8f2 /generic/proof-utils.el
parent2f1ae62a2f70c151d16171e218b126d558b5fa98 (diff)
Add additional support for pgipfloat type
Diffstat (limited to 'generic/proof-utils.el')
-rw-r--r--generic/proof-utils.el23
1 files changed, 23 insertions, 0 deletions
diff --git a/generic/proof-utils.el b/generic/proof-utils.el
index eb170e23..0b73803b 100644
--- a/generic/proof-utils.el
+++ b/generic/proof-utils.el
@@ -552,6 +552,29 @@ OTHERNAME gives an alternative name than the default <VAR>-intset.
The name of the defined function is returned."
`(proof-defintset-fn (quote ,var) (quote ,othername)))
+(defun proof-deffloatset-fn (var &optional othername)
+ "Define a function <VAR>-floatset for setting an float customize setting VAR.
+Args as for the macro `proof-deffloatset', except will be evaluated."
+ (eval
+ `(defun ,(if othername othername
+ (intern (concat (symbol-name var) "-floatset"))) (arg)
+ ,(concat "Set `" (symbol-name var) "' to ARG.
+This function simply uses customize-set-variable to set the variable.
+It was constructed with `proof-deffloatset-fn'.")
+ (interactive (list
+ (read-number
+ (format "Value for %s (float, currently %s): "
+ (symbol-name (quote ,var))
+ (symbol-value (quote ,var))))))
+ (customize-set-variable (quote ,var) arg))))
+
+(defmacro proof-deffloatset (var &optional othername)
+ "Define a function <VAR>-floatset for setting an float customize setting VAR.
+The setting function uses `customize-set-variable' to change the variable.
+OTHERNAME gives an alternative name than the default <VAR>-floatset.
+The name of the defined function is returned."
+ `(proof-deffloatset-fn (quote ,var) (quote ,othername)))
+
(defun proof-defstringset-fn (var &optional othername)
"Define a function <VAR>-toggle for setting an integer customize setting VAR.
Args as for the macro `proof-defstringset', except will be evaluated."