From: Richard M. Stallman Date: Fri, 12 Sep 1997 07:04:41 +0000 (+0000) Subject: (custom-face-menu): Use custom-face-save-command. not custom-face-save. X-Git-Tag: emacs-20.1~65 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=896a6a5d6e152fbaff5acb63c7710cb59a369634;p=emacs.git (custom-face-menu): Use custom-face-save-command. not custom-face-save. (custom-face-save-command): New function. (custom-variable-save): Fix error message. --- diff --git a/lisp/cus-edit.el b/lisp/cus-edit.el index d65dd8ae8be..501f757bcf4 100644 --- a/lisp/cus-edit.el +++ b/lisp/cus-edit.el @@ -1847,7 +1847,7 @@ Otherwise, look up symbol in `custom-guess-type-alist'." (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 @@ Optional EVENT is the location for the menu." (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 @@ Optional EVENT is the location for the menu." (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 @@ Match frames with dark backgrounds.") (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 @@ Optional EVENT is the location for the menu." (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)))