From 4c105ec50fbc06d9074a790e4d5cdeb5a79ed359 Mon Sep 17 00:00:00 2001 From: ueno Date: Wed, 28 May 2008 04:01:53 +0000 Subject: [PATCH] (riece-save-variables-files): Generate custom-set-variables instead of a list of setq. --- lisp/ChangeLog | 3 +++ lisp/riece.el | 8 +++++--- 2 files changed, 8 insertions(+), 3 deletions(-) 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)) -- 1.7.10.4