Tweak custom-variable-p and user-variable-p docs.
[bpt/emacs.git] / lisp / custom.el
index d375278..132576a 100644 (file)
@@ -591,8 +591,10 @@ If NOSET is non-nil, don't bother autoloading LOAD when setting the variable."
 
 ;; This test is also in the C code of `user-variable-p'.
 (defun custom-variable-p (variable)
-  "Return non-nil if VARIABLE is a custom variable.
-This recursively follows aliases."
+  "Return non-nil if VARIABLE is a customizable variable.
+A customizable variable is either (i) a variable whose property
+list contains a non-nil `standard-value' or `custom-autoload'
+property, or (ii) an alias for another customizable variable."
   (setq variable (indirect-variable variable))
   (or (get variable 'standard-value)
       (get variable 'custom-autoload)))
@@ -1105,7 +1107,7 @@ property `theme-feature' (which is usually a symbol created by
 
 (defcustom custom-safe-themes '(default)
   "Themes that are considered safe to load.
-If the value is a list, each element should be either the `sha1'
+If the value is a list, each element should be either the SHA-256
 hash of a safe theme file, or the symbol `default', which stands
 for any theme in the built-in Emacs theme directory (a directory
 named \"themes\" in `data-directory').
@@ -1161,7 +1163,7 @@ Return t if THEME was successfully loaded, nil otherwise."
       (error "Unable to find theme file for `%s'" theme))
     (with-temp-buffer
       (insert-file-contents fn)
-      (setq hash (sha1 (current-buffer)))
+      (setq hash (secure-hash 'sha256 (current-buffer)))
       ;; Check file safety with `custom-safe-themes', prompting the
       ;; user if necessary.
       (when (or no-confirm