Mercurial > emacs
diff lisp/cus-theme.el @ 111016:fedd4f6fa7e5
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.
author | Chong Yidong <cyd@stupidchicken.com> |
---|---|
date | Sat, 16 Oct 2010 14:27:08 -0400 |
parents | 5ffdb52c377c |
children | 9506df1b7b65 |
line wrap: on
line diff
--- a/lisp/cus-theme.el Sat Oct 16 17:08:47 2010 +0200 +++ b/lisp/cus-theme.el Sat Oct 16 14:27:08 2010 -0400 @@ -316,7 +316,7 @@ (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 @@ (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 @@ "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