From: ueno Date: Wed, 28 May 2008 04:01:53 +0000 (+0000) Subject: (riece-save-variables-files): Generate X-Git-Tag: riece-5_0_0~7 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=4c105ec50fbc06d9074a790e4d5cdeb5a79ed359;p=elisp%2Friece.git (riece-save-variables-files): Generate custom-set-variables instead of a list of setq. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 766c112..324334d 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,8 @@ 2008-05-28 Daiki Ueno + * riece.el (riece-save-variables-files): Generate + custom-set-variables instead of a list of setq. + * riece-options.el (riece-server-alist): Simplify custom-type. * riece-coding.el: Move defcustom to riece-options; require 'riece-options. diff --git a/lisp/riece.el b/lisp/riece.el index 8f80cec..ca6ebb5 100644 --- a/lisp/riece.el +++ b/lisp/riece.el @@ -259,12 +259,14 @@ If optional argument SAFE is nil, overwrite previous definitions." print-level print-length (variables riece-saved-forms)) + (insert "(custom-set-variables\n") (while variables - (prin1 `(setq ,(car variables) - ',(symbol-value (car variables))) + (insert " '") + (prin1 `(,(car variables) ,(symbol-value (car variables))) (current-buffer)) (insert "\n") - (setq variables (cdr variables))))) + (setq variables (cdr variables))) + (insert ")"))) (message (riece-mcat "Saving %s...done") riece-saved-variables-file) (setq riece-save-variables-are-dirty nil))