unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* lexical binding changes symbol standard-value property
@ 2016-06-29 13:51 Paul Rankin
  2016-06-29 15:10 ` Drew Adams
  2016-06-30  7:43 ` Stefan Monnier
  0 siblings, 2 replies; 3+ messages in thread
From: Paul Rankin @ 2016-06-29 13:51 UTC (permalink / raw)
  To: help-gnu-emacs

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



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-06-30  7:43 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-06-29 13:51 lexical binding changes symbol standard-value property Paul Rankin
2016-06-29 15:10 ` Drew Adams
2016-06-30  7:43 ` Stefan Monnier

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).