aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChong Yidong2006-01-13 02:36:49 +0000
committerChong Yidong2006-01-13 02:36:49 +0000
commitf354d94493c46772cfd62b034edb253837d4dcf2 (patch)
treea9d452a3d16c493f3a1cc1abba4a09c303c644a8
parentc798b7e89bee7dbad5dc5c1eb24c100d3618a859 (diff)
downloademacs-f354d94493c46772cfd62b034edb253837d4dcf2.tar.gz
emacs-f354d94493c46772cfd62b034edb253837d4dcf2.zip
Minor fix.
-rw-r--r--lisp/cus-theme.el32
1 files changed, 16 insertions, 16 deletions
diff --git a/lisp/cus-theme.el b/lisp/cus-theme.el
index 502220d278d..a21832c7b62 100644
--- a/lisp/cus-theme.el
+++ b/lisp/cus-theme.el
@@ -154,15 +154,15 @@ the directory " custom-theme-directory "\n\n")
154 154
155(defun custom-theme-add-variable (symbol) 155(defun custom-theme-add-variable (symbol)
156 (interactive "vVariable name: ") 156 (interactive "vVariable name: ")
157 (save-excursion 157 (cond ((assq symbol custom-theme-variables)
158 (goto-char custom-theme-insert-variable-marker) 158 (message "%s is already in the theme" (symbol-name symbol)))
159 (cond ((assq symbol custom-theme-variables) 159 ((not (boundp symbol))
160 (message "%s is already in the theme" (symbol-name symbol))) 160 (message "%s is not defined as a variable" (symbol-name symbol)))
161 ((not (boundp symbol)) 161 ((eq symbol 'custom-enabled-themes)
162 (message "%s is not defined as a variable" (symbol-name symbol))) 162 (message "Custom theme cannot contain `custom-enabled-themes'"))
163 ((eq symbol 'custom-enabled-themes) 163 (t
164 (message "Custom theme cannot contain `custom-enabled-themes'")) 164 (save-excursion
165 (t 165 (goto-char custom-theme-insert-variable-marker)
166 (widget-insert "\n") 166 (widget-insert "\n")
167 (let ((widget (widget-create 'custom-variable 167 (let ((widget (widget-create 'custom-variable
168 :tag (custom-unlispify-tag-name symbol) 168 :tag (custom-unlispify-tag-name symbol)
@@ -225,13 +225,13 @@ Optional EVENT is the location for the menu."
225 225
226(defun custom-theme-add-face (symbol) 226(defun custom-theme-add-face (symbol)
227 (interactive (list (read-face-name "Face name" nil nil))) 227 (interactive (list (read-face-name "Face name" nil nil)))
228 (save-excursion 228 (cond ((assq symbol custom-theme-faces)
229 (goto-char custom-theme-insert-face-marker) 229 (message "%s is already in the theme" (symbol-name symbol)))
230 (cond ((assq symbol custom-theme-faces) 230 ((not (facep symbol))
231 (message "%s is already in the theme" (symbol-name symbol))) 231 (message "%s is not defined as a face" (symbol-name symbol)))
232 ((not (facep symbol)) 232 (t
233 (message "%s is not defined as a face" (symbol-name symbol))) 233 (save-excursion
234 (t 234 (goto-char custom-theme-insert-face-marker)
235 (widget-insert "\n") 235 (widget-insert "\n")
236 (let ((widget (widget-create 'custom-face 236 (let ((widget (widget-create 'custom-face
237 :tag (custom-unlispify-tag-name symbol) 237 :tag (custom-unlispify-tag-name symbol)