From 0b4fd6734e06e197f99c6a540037a4b32abba0db Mon Sep 17 00:00:00 2001 From: David Aspinall Date: Wed, 20 Nov 2002 12:14:28 +0000 Subject: Add pg-custom-reset-vars. Make proofdefintset display current value --- generic/proof-utils.el | 20 +++++++++++++++----- 1 file 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))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -- cgit v1.2.3