aboutsummaryrefslogtreecommitdiff
path: root/generic/proof-utils.el
diff options
context:
space:
mode:
authorDavid Aspinall2002-08-08 09:07:42 +0000
committerDavid Aspinall2002-08-08 09:07:42 +0000
commit76e88b35fb4689c7b5afc0e3f1fcc602add2d5b6 (patch)
treecdfda1d0f1ab7ee09113c88517feec61af07c54b /generic/proof-utils.el
parentdf0d8effb6c2a1192201ef040d619819bdf72036 (diff)
Allow favourite saving when user wants.
Diffstat (limited to 'generic/proof-utils.el')
-rw-r--r--generic/proof-utils.el24
1 files changed, 23 insertions, 1 deletions
diff --git a/generic/proof-utils.el b/generic/proof-utils.el
index a476c018..ce31e4ba 100644
--- a/generic/proof-utils.el
+++ b/generic/proof-utils.el
@@ -563,7 +563,6 @@ No action if BUF is nil or killed."
;;; Utils for making functions to adjust user settings
;;;
-
(defun proof-deftoggle-fn (var &optional othername)
"Define a function <VAR>-toggle for toggling a boolean customize setting VAR.
Args as for the macro `proof-deftoggle', except will be evaluated."
@@ -627,6 +626,29 @@ The name of the defined function is returned."
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;;
+;;; Interface to custom lib
+;;;
+
+;; EMACSFIXME: A function that custom ought to provide.
+(defun pg-custom-save-vars (&rest variables)
+ "Save custom vars VARIABLES."
+ (dolist (symbol variables)
+ (let ((value (get symbol 'customized-value)))
+ ;; This code from customize-save-customized adjusts
+ ;; properties so that custom-save-all will save
+ ;; the value.
+ (when value
+ (put symbol 'saved-value value)
+ (if (fboundp 'custom-push-theme) ;; XEmacs customize
+ (custom-push-theme 'theme-value symbol 'user 'set value))
+ (put symbol 'customized-value nil))))
+ (custom-save-all))
+
+
+
+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
;; Finding executables