From: Didier Verna <didier@xemacs.org>
Subject: [PATCH] custom saving fix
Date: Tue, 28 Jan 2003 16:18:16 +0100 [thread overview]
Message-ID: <mux65s9e213.fsf@uzeb.lrde.epita.fr> (raw)
Hi !
Start a brand new emacs from scratch, customize some stuff and save
from the options menu. Nothing actually gets saved. The following patch fixes
this (latest cvs / trailing whitespaces cleanup not discarded).
lisp/ChangeLog addition:
2003-01-28 Didier Verna <didier@xemacs.org>
* cus-edit.el (custom-save-variables): also save non theme'd ones.
* cus-edit.el (custom-save-faces): ditto.
GNU Emacs source patch:
Diff command: runsocks cvs -q diff -u
Files affected: lisp/cus-edit.el
Index: lisp/cus-edit.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/cus-edit.el,v
retrieving revision 1.176
diff -u -u -r1.176 cus-edit.el
--- lisp/cus-edit.el 18 Jan 2003 03:18:20 -0000 1.176
+++ lisp/cus-edit.el 28 Jan 2003 15:14:20 -0000
@@ -758,7 +758,7 @@
(interactive (custom-prompt-variable "Set variable: "
"Set %s to value: "
current-prefix-arg))
-
+
(cond ((string= comment "")
(put variable 'variable-comment nil))
(comment
@@ -2515,7 +2515,7 @@
:button-args '(:help-echo "Control whether this attribute has any effect.")
:value-to-internal 'custom-face-edit-fix-value
:match (lambda (widget value)
- (widget-checklist-match widget
+ (widget-checklist-match widget
(custom-face-edit-fix-value widget value)))
:convert-widget 'custom-face-edit-convert-widget
:args (mapcar (lambda (att)
@@ -2543,7 +2543,7 @@
((eq key :reverse-video)
(push :inverse-video result)
(push val result))
- (t
+ (t
(push key result)
(push val result))))
(setq value (cdr (cdr value))))
@@ -2606,7 +2606,7 @@
(delete-region (car (cdr inactive))
(+ (car (cdr inactive)) (cdr (cdr inactive))))
(widget-put widget :inactive nil))))
-
+
(defun custom-face-edit-attribute-tag (widget)
"Returns the first :tag property in WIDGET or one of its children."
@@ -3709,7 +3709,8 @@
(when (or (and spec
(eq (nth 0 spec) 'user)
(eq (nth 1 spec) 'set))
- comment)
+ comment
+ (and (null spec) (get symbol 'saved-value)))
(unless (bolp)
(princ "\n"))
(princ " '(")
@@ -3779,7 +3780,8 @@
(when (or (and theme-spec
(eq (nth 0 theme-spec) 'user)
(eq (nth 1 theme-spec) 'set))
- comment)
+ comment
+ (and (null theme-spec) (get symbol 'saved-face)))
;; Don't print default face here.
(unless (bolp)
(princ "\n"))
@@ -3833,7 +3835,7 @@
(mapatoms mapper)
(when started-writing
(princ ")\n")))))
-
+
(defun custom-save-loaded-themes ()
(let ((themes (reverse (get 'user 'theme-loads-themes)))
(standard-output (current-buffer)))
@@ -3843,7 +3845,7 @@
(mapc (lambda (theme)
(princ "\n '")
(prin1 theme)) themes)
- (princ " )\n"))))
+ (princ " )\n"))))
;;;###autoload
(defun customize-save-customized ()
--
Didier Verna, didier@lrde.epita.fr, http://www.lrde.epita.fr/~didier
EPITA / LRDE, 14-16 rue Voltaire Tel.+33 (1) 44 08 01 85
94276 Le Kremlin-Bicêtre, France Fax.+33 (1) 53 14 59 22 didier@xemacs.org
next reply other threads:[~2003-01-28 15:18 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-01-28 15:18 Didier Verna [this message]
2003-01-29 21:57 ` [PATCH] custom saving fix John Paul Wallington
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=mux65s9e213.fsf@uzeb.lrde.epita.fr \
--to=didier@xemacs.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).