summaryrefslogtreecommitdiff
path: root/lisp/custom.el
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2011-04-25 23:17:52 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2011-04-25 23:17:52 -0700
commit671875dac181f7f1337f21d013a9c3d5f235ddf2 (patch)
tree4091c2537439713df8efe8d3376116a6db3eb1c5 /lisp/custom.el
parentf904488ff40dcee3e340b63a6386dde124d1241c (diff)
parent0c6b7b19e52ba18b5d4fd2d4b73b133a0a721603 (diff)
downloademacs-671875dac181f7f1337f21d013a9c3d5f235ddf2.tar.gz
Merge from mainline.
Diffstat (limited to 'lisp/custom.el')
-rw-r--r--lisp/custom.el18
1 files changed, 13 insertions, 5 deletions
diff --git a/lisp/custom.el b/lisp/custom.el
index 9673db47ea8..8295777f1f1 100644
--- a/lisp/custom.el
+++ b/lisp/custom.el
@@ -313,11 +313,19 @@ for more information."
;; It is better not to use backquote in this file,
;; because that makes a bootstrapping problem
;; if you need to recompile all the Lisp files using interpreted code.
- (nconc (list 'custom-declare-variable
- (list 'quote symbol)
- (list 'quote value)
- doc)
- args))
+ `(custom-declare-variable
+ ',symbol
+ ,(if lexical-binding ;FIXME: This is not reliable, but is all we have.
+ ;; The `default' arg should be an expression that evaluates to
+ ;; the value to use. The use of `eval' for it is spread over
+ ;; many different places and hence difficult to eliminate, yet
+ ;; we want to make sure that the `value' expression is checked by the
+ ;; byte-compiler, and that lexical-binding is obeyed, so quote the
+ ;; expression with `lambda' rather than with `quote'.
+ `(list (lambda () ,value))
+ `',value)
+ ,doc
+ ,@args))
;;; The `defface' Macro.