]> git.eshelyaron.com Git - emacs.git/commitdiff
* custom.el (custom-theme-load-path): Demote to defvar
authorArtur Malabarba <bruce.connor.am@gmail.com>
Fri, 16 Oct 2015 15:10:38 +0000 (16:10 +0100)
committerArtur Malabarba <bruce.connor.am@gmail.com>
Fri, 16 Oct 2015 15:14:26 +0000 (16:14 +0100)
`custom-theme-load-path' was a defcustom, but it shouldn't be for the
same reason that `load-path' shouldn't.  Setting it via the customize
interface is a trap for the user.

Installed themes commonly add themselves to this variable, which means
its value is not fit for being saved (it will permanently remember dirs
that don't exist anymore).

This is aggravated by the fact that Emacs always applies the `user'
theme on top of any theme that's loaded, since this will apply the old
variable value and remove any new directories that had been recently
added by themes themselves.

Not to mention, we already have `custom-theme-directory', which is safe
to customize.

lisp/custom.el

index e212e32807dfc810243495849d568dfdf920e003..c5d0e65f42bfad340557fde71ba824821bd600be 100644 (file)
@@ -1120,7 +1120,7 @@ directory first---see `custom-theme-load-path'."
   :group 'customize
   :version "22.1")
 
-(defcustom custom-theme-load-path (list 'custom-theme-directory t)
+(defvar custom-theme-load-path (list 'custom-theme-directory t)
   "List of directories to search for custom theme files.
 When loading custom themes (e.g. in `customize-themes' and
 `load-theme'), Emacs searches for theme files in the specified
@@ -1132,13 +1132,11 @@ order.  Each element in the list should be one of the following:
 - a directory name (a string).
 
 Each theme file is named THEME-theme.el, where THEME is the theme
-name."
-  :type '(repeat (choice (const :tag "custom-theme-directory"
-                               custom-theme-directory)
-                        (const :tag "Built-in theme directory" t)
-                        directory))
-  :group 'customize
-  :version "24.1")
+name.
+
+This variable is designed for use in lisp code (including
+external packages).  For manual user customizations, use
+`custom-theme-directory' instead.")
 
 (defvar custom--inhibit-theme-enable nil
   "Whether the custom-theme-set-* functions act immediately.