all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / 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

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.