From: Artur Malabarba Date: Fri, 16 Oct 2015 15:10:38 +0000 (+0100) Subject: * custom.el (custom-theme-load-path): Demote to defvar X-Git-Tag: emacs-25.0.90~1105 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=995b69918bddb58536b5d09d2127179314e1fffb;p=emacs.git * custom.el (custom-theme-load-path): Demote to defvar `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. --- diff --git a/lisp/custom.el b/lisp/custom.el index e212e32807d..c5d0e65f42b 100644 --- a/lisp/custom.el +++ b/lisp/custom.el @@ -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.