aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1997-09-12 07:04:41 +0000
committerRichard M. Stallman1997-09-12 07:04:41 +0000
commit896a6a5d6e152fbaff5acb63c7710cb59a369634 (patch)
tree840ea3c77f03738cfcd52e0c9fb44b348fc8c163
parentcd22039d5bc3c5036cc3e4457045de6a92a3ad42 (diff)
downloademacs-896a6a5d6e152fbaff5acb63c7710cb59a369634.tar.gz
emacs-896a6a5d6e152fbaff5acb63c7710cb59a369634.zip
(custom-face-menu): Use custom-face-save-command. not custom-face-save.
(custom-face-save-command): New function. (custom-variable-save): Fix error message.
-rw-r--r--lisp/cus-edit.el15
1 files changed, 10 insertions, 5 deletions
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'."
1847 (let* ((format (widget-get type :format)) 1847 (let* ((format (widget-get type :format))
1848 tag-format value-format) 1848 tag-format value-format)
1849 (unless (string-match ":" format) 1849 (unless (string-match ":" format)
1850 (error "Bad format.")) 1850 (error "Bad format"))
1851 (setq tag-format (substring format 0 (match-end 0))) 1851 (setq tag-format (substring format 0 (match-end 0)))
1852 (setq value-format (substring format (match-end 0))) 1852 (setq value-format (substring format (match-end 0)))
1853 (push (widget-create-child-and-convert 1853 (push (widget-create-child-and-convert
@@ -2009,7 +2009,7 @@ Optional EVENT is the location for the menu."
2009 (set (or (get symbol 'custom-set) 'set-default)) 2009 (set (or (get symbol 'custom-set) 'set-default))
2010 val) 2010 val)
2011 (cond ((eq state 'hidden) 2011 (cond ((eq state 'hidden)
2012 (error "Cannot set hidden variable.")) 2012 (error "Cannot set hidden variable"))
2013 ((setq val (widget-apply child :validate)) 2013 ((setq val (widget-apply child :validate))
2014 (goto-char (widget-get val :from)) 2014 (goto-char (widget-get val :from))
2015 (error "%s" (widget-get val :error))) 2015 (error "%s" (widget-get val :error)))
@@ -2031,7 +2031,7 @@ Optional EVENT is the location for the menu."
2031 (set (or (get symbol 'custom-set) 'set-default)) 2031 (set (or (get symbol 'custom-set) 'set-default))
2032 val) 2032 val)
2033 (cond ((eq state 'hidden) 2033 (cond ((eq state 'hidden)
2034 (error "Cannot set hidden variable.")) 2034 (error "Cannot set hidden variable"))
2035 ((setq val (widget-apply child :validate)) 2035 ((setq val (widget-apply child :validate))
2036 (goto-char (widget-get val :from)) 2036 (goto-char (widget-get val :from))
2037 (error "%s" (widget-get val :error))) 2037 (error "%s" (widget-get val :error)))
@@ -2315,7 +2315,7 @@ Match frames with dark backgrounds.")
2315 2315
2316(defvar custom-face-menu 2316(defvar custom-face-menu
2317 '(("Set for Current Session" custom-face-set) 2317 '(("Set for Current Session" custom-face-set)
2318 ("Save for Future Sessions" custom-face-save) 2318 ("Save for Future Sessions" custom-face-save-command)
2319 ("Reset to Saved" custom-face-reset-saved 2319 ("Reset to Saved" custom-face-reset-saved
2320 (lambda (widget) 2320 (lambda (widget)
2321 (get (widget-value widget) 'saved-face))) 2321 (get (widget-value widget) 'saved-face)))
@@ -2394,8 +2394,13 @@ Optional EVENT is the location for the menu."
2394 (custom-face-state-set widget) 2394 (custom-face-state-set widget)
2395 (custom-redraw-magic widget))) 2395 (custom-redraw-magic widget)))
2396 2396
2397(defun custom-face-save-command (widget)
2398 "Save in `.emacs' the face attributes in WIDGET."
2399 (custom-face-save widget)
2400 (custom-save-all))
2401
2397(defun custom-face-save (widget) 2402(defun custom-face-save (widget)
2398 "Make the face attributes in WIDGET default." 2403 "Prepare for saving WIDGET's face attributes, but don't write `.emacs'."
2399 (let* ((symbol (widget-value widget)) 2404 (let* ((symbol (widget-value widget))
2400 (child (car (widget-get widget :children))) 2405 (child (car (widget-get widget :children)))
2401 (value (widget-value child))) 2406 (value (widget-value child)))