From 4711db060a016188bfad928fe35c8ad27e23dddc Mon Sep 17 00:00:00 2001 From: ueno Date: Sun, 1 Jun 2008 15:34:09 +0000 Subject: [PATCH] (riece-read-variables-files): Re-evaluate custom settings. --- lisp/ChangeLog | 4 ++++ lisp/riece.el | 15 ++++++++++++--- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index e3cc04c..a6160c4 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2008-06-02 Daiki Ueno + + * riece.el (riece-read-variables-files): Re-evaluate custom settings. + 2008-05-30 Daiki Ueno * Riece: Version 5.0.0 released. diff --git a/lisp/riece.el b/lisp/riece.el index ca6ebb5..67ee557 100644 --- a/lisp/riece.el +++ b/lisp/riece.el @@ -238,12 +238,21 @@ If optional argument SAFE is nil, overwrite previous definitions." (let ((files (if file (setq riece-variables-file file riece-variables-files (list file)) - riece-variables-files))) + riece-variables-files)) + (variables riece-saved-forms)) (while files (condition-case nil (load (expand-file-name (car files))) (file-error nil)) - (setq files (cdr files))))) + (setq files (cdr files))) + (while variables + (if (fboundp 'custom-reevaluate-setting) + (custom-reevaluate-setting (car variables)) + (funcall (or (get (car variables) 'custom-set) 'set-default) + (car variables) + (eval (car (or (get (car variables) 'saved-value) + (get (car variables) 'standard-value)))))) + (setq variables (cdr variables))))) (defvar print-quoted) (defvar print-escape-multibyte) @@ -262,7 +271,7 @@ If optional argument SAFE is nil, overwrite previous definitions." (insert "(custom-set-variables\n") (while variables (insert " '") - (prin1 `(,(car variables) ,(symbol-value (car variables))) + (prin1 `(,(car variables) ',(symbol-value (car variables))) (current-buffer)) (insert "\n") (setq variables (cdr variables))) -- 1.7.10.4