summaryrefslogtreecommitdiff
path: root/lisp/custom.el
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2021-02-02 14:39:28 -0500
committerStefan Monnier <monnier@iro.umontreal.ca>2021-02-02 14:39:28 -0500
commit04ab3904eddc01af918fb85b8712cd5d45238468 (patch)
tree558d0470945fcdced26f250e404c129b24855845 /lisp/custom.el
parentc2b3a1d41457a4edbf86673c2680541039b85d59 (diff)
downloademacs-04ab3904eddc01af918fb85b8712cd5d45238468.tar.gz
* lisp/gnus/gnus-art.el: Fix misuse of `standard-value`.
* lisp/custom.el (custom--standard-value): New function. * lisp/gnus/gnus-art.el: (gnus-article-browse-html-parts) (gnus-article-browse-html-article): * lisp/dired-aux.el (dired-do-find-regexp-and-replace): * lisp/emacs-lisp/package-x.el (package-upload-buffer-internal): * lisp/startup.el (command-line): Use it.
Diffstat (limited to 'lisp/custom.el')
-rw-r--r--lisp/custom.el6
1 files changed, 5 insertions, 1 deletions
diff --git a/lisp/custom.el b/lisp/custom.el
index 5e354c4c595..833810718b7 100644
--- a/lisp/custom.el
+++ b/lisp/custom.el
@@ -350,7 +350,7 @@ for more information."
;; if you need to recompile all the Lisp files using interpreted code.
`(custom-declare-variable
',symbol
- ,(if lexical-binding ;FIXME: This is not reliable, but is all we have.
+ ,(if lexical-binding
;; The STANDARD arg should be an expression that evaluates to
;; the standard value. The use of `eval' for it is spread
;; over many different places and hence difficult to
@@ -627,6 +627,10 @@ property, or (ii) an alias for another customizable variable."
(or (get variable 'standard-value)
(get variable 'custom-autoload))))
+(defun custom--standard-value (variable)
+ "Return the standard value of VARIABLE."
+ (eval (car (get variable 'standard-value)) t))
+
(define-obsolete-function-alias 'user-variable-p 'custom-variable-p "24.3")
(defun custom-note-var-changed (variable)