diff options
| author | David Aspinall | 2002-11-20 12:14:28 +0000 |
|---|---|---|
| committer | David Aspinall | 2002-11-20 12:14:28 +0000 |
| commit | 0b4fd6734e06e197f99c6a540037a4b32abba0db (patch) | |
| tree | d578b200939e988a1958e24825ca717aa30fce5a | |
| parent | 30259f608b82ae950d4ca0852b3c72c60f101c0a (diff) | |
Add pg-custom-reset-vars. Make proofdefintset display current value
| -rw-r--r-- | generic/proof-utils.el | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/generic/proof-utils.el b/generic/proof-utils.el index b0215bbe..da796e2c 100644 --- a/generic/proof-utils.el +++ b/generic/proof-utils.el @@ -698,8 +698,9 @@ Args as for the macro `proof-defintset', except will be evaluated." ,(concat "Set `" (symbol-name var) "' to ARG. This function simply uses customize-set-variable to set the variable. It was constructed with `proof-defintset-fn'.") - (interactive ,(concat "nValue for " (symbol-name var) - " (integer): ")) + (interactive ,(format "nValue for %s (int, currently %s):" + (symbol-name var) + (symbol-value var))) (customize-set-variable (quote ,var) arg)))) (defmacro proof-defintset (var &optional othername) @@ -718,8 +719,8 @@ Args as for the macro `proof-defstringset', except will be evaluated." ,(concat "Set `" (symbol-name var) "' to ARG. This function simply uses customize-set-variable to set the variable. It was constructed with `proof-defstringset-fn'.") - (interactive ,(concat "sValue for " (symbol-name var) - " (a string): ")) + (interactive ,(format "sValue for %s (a string): " + (symbol-name var))) (customize-set-variable (quote ,var) arg)))) (defmacro proof-defstringset (var &optional othername) @@ -750,7 +751,16 @@ The name of the defined function is returned." (put symbol 'customized-value nil)))) (custom-save-all)) - +;; FIXME: this doesn't do quite same thing as reset button, +;; which *removes* a setting from `custom-set-variables' list +;; in custom.el. Instead, this adds something to a +;; custom-reset-variables list. +(defun pg-custom-reset-vars (&rest variables) + "Reset custom vars VARIABLES to their default values." + ;; FIXME: probably this XEmacs specific + (apply 'custom-reset-variables + (mapcar (lambda (var) (list var 'default)) + variables))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
