changeset 19883:519eab181c36

(custom-face-menu): Use custom-face-save-command. not custom-face-save. (custom-face-save-command): New function. (custom-variable-save): Fix error message.
author Richard M. Stallman <rms@gnu.org>
date Fri, 12 Sep 1997 07:04:41 +0000
parents b6aaf1f70676
children 8426de03a77a
files lisp/cus-edit.el
diffstat 1 files changed, 10 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/cus-edit.el	Fri Sep 12 04:06:46 1997 +0000
+++ b/lisp/cus-edit.el	Fri Sep 12 07:04:41 1997 +0000
@@ -1847,7 +1847,7 @@
 	   (let* ((format (widget-get type :format))
 		  tag-format value-format)
 	     (unless (string-match ":" format)
-	       (error "Bad format."))
+	       (error "Bad format"))
 	     (setq tag-format (substring format 0 (match-end 0)))
 	     (setq value-format (substring format (match-end 0)))
 	     (push (widget-create-child-and-convert
@@ -2009,7 +2009,7 @@
 	 (set (or (get symbol 'custom-set) 'set-default))
 	  val)
     (cond ((eq state 'hidden)
-	   (error "Cannot set hidden variable."))
+	   (error "Cannot set hidden variable"))
 	  ((setq val (widget-apply child :validate))
 	   (goto-char (widget-get val :from))
 	   (error "%s" (widget-get val :error)))
@@ -2031,7 +2031,7 @@
 	 (set (or (get symbol 'custom-set) 'set-default))
 	 val)
     (cond ((eq state 'hidden)
-	   (error "Cannot set hidden variable."))
+	   (error "Cannot set hidden variable"))
 	  ((setq val (widget-apply child :validate))
 	   (goto-char (widget-get val :from))
 	   (error "%s" (widget-get val :error)))
@@ -2315,7 +2315,7 @@
 
 (defvar custom-face-menu 
   '(("Set for Current Session" custom-face-set)
-    ("Save for Future Sessions" custom-face-save)
+    ("Save for Future Sessions" custom-face-save-command)
     ("Reset to Saved" custom-face-reset-saved
      (lambda (widget)
        (get (widget-value widget) 'saved-face)))
@@ -2394,8 +2394,13 @@
     (custom-face-state-set widget)
     (custom-redraw-magic widget)))
 
+(defun custom-face-save-command (widget)
+  "Save in `.emacs' the face attributes in WIDGET."
+  (custom-face-save widget)
+  (custom-save-all))
+
 (defun custom-face-save (widget)
-  "Make the face attributes in WIDGET default."
+  "Prepare for saving WIDGET's face attributes, but don't write `.emacs'."
   (let* ((symbol (widget-value widget))
 	 (child (car (widget-get widget :children)))
 	 (value (widget-value child)))