help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

lexical binding changes symbol standard-value property


From: Paul Rankin
Subject: lexical binding changes symbol standard-value property
Date: Wed, 29 Jun 2016 23:51:21 +1000

Something strange is going on with lexical-binding and defcustom...

(defcustom dummy-var t
  "This is a test var.")
;; => dummy-var

(car (get 'dummy-var 'standard-value))
;; => t

(setq lexical-binding t)
;; => t

(defcustom dummy-var t
  "This is a test var.")
;; = dummy-var

(car (get 'dummy-var 'standard-value))
;; => (funcall (function (closure (t) nil t)))

Why is the standard-value property of dummy-var changing? I kinda need it to be 
consistent...

I can resolve with:
(eval (car (get 'dummy-var 'standard-value)
;; => t
...but not sure about using (eval ...)

Ideas?

-- 
Paul W. Rankin
www.paulwrankin.com



reply via email to

[Prev in Thread] Current Thread [Next in Thread]