aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArtur Malabarba2015-10-16 16:10:38 +0100
committerArtur Malabarba2015-10-16 16:14:26 +0100
commit995b69918bddb58536b5d09d2127179314e1fffb (patch)
treee649d47e751bf7ed79e35fc54a2f891256df2783
parentce47ac81f6aaa347942fb7f7173b349bd1a231c1 (diff)
downloademacs-995b69918bddb58536b5d09d2127179314e1fffb.tar.gz
emacs-995b69918bddb58536b5d09d2127179314e1fffb.zip
* 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.
-rw-r--r--lisp/custom.el14
1 files changed, 6 insertions, 8 deletions
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'."
1120 :group 'customize 1120 :group 'customize
1121 :version "22.1") 1121 :version "22.1")
1122 1122
1123(defcustom custom-theme-load-path (list 'custom-theme-directory t) 1123(defvar custom-theme-load-path (list 'custom-theme-directory t)
1124 "List of directories to search for custom theme files. 1124 "List of directories to search for custom theme files.
1125When loading custom themes (e.g. in `customize-themes' and 1125When loading custom themes (e.g. in `customize-themes' and
1126`load-theme'), Emacs searches for theme files in the specified 1126`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:
1132- a directory name (a string). 1132- a directory name (a string).
1133 1133
1134Each theme file is named THEME-theme.el, where THEME is the theme 1134Each theme file is named THEME-theme.el, where THEME is the theme
1135name." 1135name.
1136 :type '(repeat (choice (const :tag "custom-theme-directory" 1136
1137 custom-theme-directory) 1137This variable is designed for use in lisp code (including
1138 (const :tag "Built-in theme directory" t) 1138external packages). For manual user customizations, use
1139 directory)) 1139`custom-theme-directory' instead.")
1140 :group 'customize
1141 :version "24.1")
1142 1140
1143(defvar custom--inhibit-theme-enable nil 1141(defvar custom--inhibit-theme-enable nil
1144 "Whether the custom-theme-set-* functions act immediately. 1142 "Whether the custom-theme-set-* functions act immediately.