summaryrefslogtreecommitdiff
path: root/lisp/cus-theme.el
diff options
context:
space:
mode:
authorChong Yidong <cyd@stupidchicken.com>2010-10-16 14:27:08 -0400
committerChong Yidong <cyd@stupidchicken.com>2010-10-16 14:27:08 -0400
commit782b5e8d92668cc6d434c836d076e26db1cab7c1 (patch)
tree4fc21b10d9bdc82198da99618a48112d98cadecf /lisp/cus-theme.el
parent99f65cface3bf5f8a8af7b9bd8a7159b5c77fad9 (diff)
downloademacs-782b5e8d92668cc6d434c836d076e26db1cab7c1.tar.gz
emacs-782b5e8d92668cc6d434c836d076e26db1cab7c1.tar.bz2
emacs-782b5e8d92668cc6d434c836d076e26db1cab7c1.zip
Move built-in theme directory to etc/.
* custom.el: Custom themes no longer use load-path. (custom-theme-load-path): New option. Change built-in theme directory to etc/. (custom-enabled-themes): Add custom-theme-load-path dependency. (custom-theme--load-path): New function. (load-theme, custom-available-themes): Use it. * cus-theme.el (describe-theme-1): Use custom-theme--load-path. (customize-themes): Link to custom-theme-load-path variable.
Diffstat (limited to 'lisp/cus-theme.el')
-rw-r--r--lisp/cus-theme.el21
1 files changed, 5 insertions, 16 deletions
diff --git a/lisp/cus-theme.el b/lisp/cus-theme.el
index 241dd6cc069..34a03539719 100644
--- a/lisp/cus-theme.el
+++ b/lisp/cus-theme.el
@@ -316,7 +316,7 @@ SPEC, if non-nil, should be a face spec to which to set the widget."
(with-temp-buffer
(emacs-lisp-mode)
- (unless (file-exists-p custom-theme-directory)
+ (unless (file-directory-p custom-theme-directory)
(make-directory (file-name-as-directory custom-theme-directory) t))
(setq buffer-file-name filename)
(erase-buffer)
@@ -419,7 +419,7 @@ It includes all faces in list FACES."
(prin1 theme)
(princ " is a custom theme")
(let ((fn (locate-file (concat (symbol-name theme) "-theme.el")
- (cons custom-theme-directory load-path)
+ (custom-theme--load-path)
'("" "c")))
doc)
(when fn
@@ -508,26 +508,15 @@ omitted, a buffer named *Custom Themes* is used."
"Type RET or click to enable/disable listed custom themes.
Type \\[custom-describe-theme] to describe the theme at point.
Theme files are named *-theme.el in `"))
- (when (stringp custom-theme-directory)
- (widget-create 'link :value custom-theme-directory
- :button-face 'custom-link
- :mouse-face 'highlight
- :pressed-face 'highlight
- :help-echo "Describe `custom-theme-directory'."
- :keymap custom-mode-link-map
- :follow-link 'mouse-face
- :action (lambda (widget &rest ignore)
- (describe-variable 'custom-theme-directory)))
- (widget-insert "' or `"))
- (widget-create 'link :value "load-path"
+ (widget-create 'link :value "custom-theme-load-path"
:button-face 'custom-link
:mouse-face 'highlight
:pressed-face 'highlight
- :help-echo "Describe `load-path'."
+ :help-echo "Describe `custom-theme-load-path'."
:keymap custom-mode-link-map
:follow-link 'mouse-face
:action (lambda (widget &rest ignore)
- (describe-variable 'load-path)))
+ (describe-variable 'custom-theme-load-path)))
(widget-insert "'.\n\n")
;; If the user has made customizations, display a warning and