From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.help Subject: Re: lexical binding changes symbol standard-value property Date: Thu, 30 Jun 2016 03:43:23 -0400 Message-ID: References: <1467208281.2809432.651951793.477B9611@webmail.messagingengine.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1467272720 28301 80.91.229.3 (30 Jun 2016 07:45:20 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 30 Jun 2016 07:45:20 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Jun 30 09:45:10 2016 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1bIWeq-0007eS-HS for geh-help-gnu-emacs@m.gmane.org; Thu, 30 Jun 2016 09:45:08 +0200 Original-Received: from localhost ([::1]:47510 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bIWep-00072c-Hk for geh-help-gnu-emacs@m.gmane.org; Thu, 30 Jun 2016 03:45:07 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:59777) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bIWdU-0006cW-8q for help-gnu-emacs@gnu.org; Thu, 30 Jun 2016 03:43:45 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bIWdO-0000xC-8s for help-gnu-emacs@gnu.org; Thu, 30 Jun 2016 03:43:43 -0400 Original-Received: from plane.gmane.org ([80.91.229.3]:54633) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bIWdO-0000x6-1s for help-gnu-emacs@gnu.org; Thu, 30 Jun 2016 03:43:38 -0400 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1bIWdF-0006Sk-Fi for help-gnu-emacs@gnu.org; Thu, 30 Jun 2016 09:43:29 +0200 Original-Received: from dyn.144-85-234-142.dsl.vtx.ch ([144.85.234.142]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 30 Jun 2016 09:43:29 +0200 Original-Received: from monnier by dyn.144-85-234-142.dsl.vtx.ch with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 30 Jun 2016 09:43:29 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 25 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: dyn.144-85-234-142.dsl.vtx.ch User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) Cancel-Lock: sha1:3q0TPSAWlDJhKDXxlON47eSuYKc= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:110666 Archived-At: > (car (get 'dummy-var 'standard-value)) > ;; => t (car (get 'dummy-var 'standard-value)) is defined to contain an *expression* rather than a *value*. > I can resolve with: > (eval (car (get 'dummy-var 'standard-value) > ;; => t > ...but not sure about using (eval ...) Using `eval' is (and always has been) the only correct way to get the "standard-value". E.g. (defcustom sm-test (+ 1 2) "hello") (car (get 'sm-test 'standard-value)) returns (+ 1 2) rather than 3 (well, with lexical-binding it returns yet something else, but that is also an expression which evaluates to 3). Stefan