From unknown Fri Jun 20 18:15:31 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#2951 <2951@debbugs.gnu.org> To: bug#2951 <2951@debbugs.gnu.org> Subject: Status: Suggestion: self-evaluating-p function Reply-To: bug#2951 <2951@debbugs.gnu.org> Date: Sat, 21 Jun 2025 01:15:31 +0000 retitle 2951 Suggestion: self-evaluating-p function reassign 2951 emacs submitter 2951 Ralph Schleicher severity 2951 wishlist thanks From ralph@mueller-schleicher.de Fri Apr 10 14:31:21 2009 Received: (at submit) by emacsbugs.donarmstrong.com; 10 Apr 2009 21:31:21 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=0.0 required=4.0 tests=MURPHY_DRUGS_REL8 autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n3ALVHih022876 for ; Fri, 10 Apr 2009 14:31:19 -0700 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LsOJg-00064l-Ti for bug-gnu-emacs@gnu.org; Fri, 10 Apr 2009 17:31:17 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LsOJf-00064G-OU for bug-gnu-emacs@gnu.org; Fri, 10 Apr 2009 17:31:16 -0400 Received: from [199.232.76.173] (port=34514 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LsOJf-00064A-KU for bug-gnu-emacs@gnu.org; Fri, 10 Apr 2009 17:31:15 -0400 Received: from nsi67.de ([85.31.187.140]:36990) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LsOJf-0000ec-39 for bug-gnu-emacs@gnu.org; Fri, 10 Apr 2009 17:31:15 -0400 Received: from bravo.mueller-schleicher.i (p57ADFF0F.dip.t-dialin.net [87.173.255.15]) by nsi67.de (Postfix) with ESMTP id 85D2E7802D1 for ; Fri, 10 Apr 2009 23:31:11 +0200 (CEST) Received: from echo.mueller-schleicher.i (echo [192.168.178.5]) by bravo.mueller-schleicher.i (Postfix) with ESMTP id 72D2EFC838 for ; Fri, 10 Apr 2009 23:31:07 +0200 (CEST) Received: by echo.mueller-schleicher.i (Postfix, from userid 1000) id 26D044B00FA; Fri, 10 Apr 2009 23:31:07 +0200 (CEST) To: bug-gnu-emacs@gnu.org Subject: Suggestion: self-evaluating-p function Organization: Ralph Schleicher From: Ralph Schleicher Date: Fri, 10 Apr 2009 23:31:07 +0200 Message-ID: <87myaogpr8.fsf@echo.mueller-schleicher.i> User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) I would like to have a 'self-evaluating-p' function in Emacs to check whether or not a value has to be quoted. Please find attached a patch with an example implementation together with ChangeLog entries and documentation. diff -u emacs-22.3/lisp/ChangeLog.orig emacs-22.3/lisp/ChangeLogyes --- emacs-22.3/lisp/ChangeLog.orig 2008-09-05 18:12:23.000000000 +0200 +++ emacs-22.3/lisp/ChangeLog 2009-04-10 22:52:48.000000000 +0200 @@ -1,3 +1,7 @@ +2009-04-10 Ralph Schleicher + + * subr.el (self-evaluating-p): New function. + 2008-09-05 Chong Yidong * Version 22.3 released. diff -u emacs-22.3/lisp/subr.el.orig emacs-22.3/lisp/subr.el --- emacs-22.3/lisp/subr.el.orig 2008-09-02 17:15:26.000000000 +0200 +++ emacs-22.3/lisp/subr.el 2009-04-10 22:51:26.000000000 +0200 @@ -185,6 +185,19 @@ (while t (signal 'error (list (apply 'format args))))) +(defun self-evaluating-p (object) + "Return t if OBJECT is a self-evaluating form. +That means OBJECT is neither a symbol nor a list except for +nil (which is a symbol and a list), t (which is a symbol), +keywords (which are symbols), and lambda expressions (which +are lists)." + (if (symbolp object) + (or (eq object nil) + (eq object t) + (keywordp object)) + (or (atom object) + (eq (car object) 'lambda)))) + ;; We put this here instead of in frame.el so that it's defined even on ;; systems where frame.el isn't loaded. (defun frame-configuration-p (object) diff -u emacs-22.3/lispref/ChangeLog.orig emacs-22.3/lispref/ChangeLog --- emacs-22.3/lispref/ChangeLog.orig 2008-09-05 18:12:32.000000000 +0200 +++ emacs-22.3/lispref/ChangeLog 2009-04-10 22:52:32.000000000 +0200 @@ -1,3 +1,7 @@ +2009-04-10 Ralph Schleicher + + * eval.texi (Self-Evaluating Forms): Add self-evaluating-p. + 2008-09-05 Chong Yidong * Version 22.3 released. diff -u emacs-22.3/lispref/eval.texi.orig emacs-22.3/lispref/eval.texi --- emacs-22.3/lispref/eval.texi.orig 2008-01-07 09:49:06.000000000 +0100 +++ emacs-22.3/lispref/eval.texi 2009-04-10 22:43:34.000000000 +0200 @@ -178,6 +178,36 @@ @end group @end example +@defun self-evaluating-p object +This function returns @code{t} if @var{object} is a self-evaluating +form. That means, @var{object} is neither a symbol nor a list except +for @code{nil} (which is a symbol and a list), @code{t} (which is a +symbol), keywords (which are symbols), and lambda expressions (which +are lists). @xref{Constant Variables}, and @ref{Lambda Expressions}, +for more information. +@end defun + + Please note that @code{self-evaluating-p} only flags those symbols +as self-evaluating forms where the result does not depend on scope. + +@example +@group +(setq foo 1) + @result{} 1 +(self-evaluating-p 'foo) + @result{} nil +(let ((foo 'foo)) + (self-evaluating-p 'foo)) + @result{} nil +;; @r{Likewise with @code{eq}.} +(eq 'foo foo) + @result{} nil +(let ((foo 'foo)) + (eq 'foo foo)) + @result{} t +@end group +@end example + @node Symbol Forms @subsection Symbol Forms @cindex symbol evaluation -- Ralph From rgm@gnu.org Fri Apr 10 19:01:43 2009 Received: (at control) by emacsbugs.donarmstrong.com; 11 Apr 2009 02:01:43 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-2.0 required=4.0 tests=VALID_BTS_CONTROL autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n3B21eZP004478 for ; Fri, 10 Apr 2009 19:01:42 -0700 Received: from rgm by fencepost.gnu.org with local (Exim 4.67) (envelope-from ) id 1LsSXM-0007pr-4e; Fri, 10 Apr 2009 22:01:40 -0400 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <18911.64004.96908.212907@fencepost.gnu.org> Date: Fri, 10 Apr 2009 22:01:40 -0400 From: Glenn Morris To: control Subject: control message tags 2383 moreinfo tags 2865 moreinfo retitle 2929 filling of multi-line comments severity 2951 wishlist reassign 2948 spam reassign 2952 spam reassign 2953 spam reassign 2954 spam reassign 2955 spam reassign 2956 emacs,w32 From monnier@iro.umontreal.ca Sat Apr 11 05:53:55 2009 Received: (at 2951) by emacsbugs.donarmstrong.com; 11 Apr 2009 12:53:55 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-0.5 required=4.0 tests=HAS_BUG_NUMBER,XIRONPORT autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from ironport2-out.teksavvy.com (ironport2-out.teksavvy.com [206.248.154.182]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n3BCrpq4021657 for <2951@emacsbugs.donarmstrong.com>; Sat, 11 Apr 2009 05:53:53 -0700 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AvcFAFAv4ElLd+7D/2dsb2JhbACBUsgbg3wGhRU X-IronPort-AV: E=Sophos;i="4.40,171,1238990400"; d="scan'208";a="36896464" Received: from 75-119-238-195.dsl.teksavvy.com (HELO pastel.home) ([75.119.238.195]) by ironport2-out.teksavvy.com with ESMTP; 11 Apr 2009 08:53:45 -0400 Received: by pastel.home (Postfix, from userid 20848) id 68D9E83B6; Sat, 11 Apr 2009 08:53:45 -0400 (EDT) From: Stefan Monnier To: Ralph Schleicher Cc: 2951@debbugs.gnu.org Subject: Re: bug#2951: Suggestion: self-evaluating-p function Message-ID: References: <87myaogpr8.fsf@echo.mueller-schleicher.i> Date: Sat, 11 Apr 2009 08:53:45 -0400 In-Reply-To: <87myaogpr8.fsf@echo.mueller-schleicher.i> (Ralph Schleicher's message of "Fri, 10 Apr 2009 23:31:07 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.92 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii > I would like to have a 'self-evaluating-p' function in Emacs to check > whether or not a value has to be quoted. I'm not necessarily opposed, but I'd first hear some arguments explaining why/when one would need that. Stefan From ralph@mueller-schleicher.de Sat Apr 11 14:35:16 2009 Received: (at 2951) by emacsbugs.donarmstrong.com; 11 Apr 2009 21:35:17 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-2.9 required=4.0 tests=FOURLA,HAS_BUG_NUMBER autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from nsi67.de (nsi67.de [85.31.187.140]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n3BLZ7xo027305 for <2951@emacsbugs.donarmstrong.com>; Sat, 11 Apr 2009 14:35:09 -0700 Received: from bravo.mueller-schleicher.i (p57ADFE52.dip.t-dialin.net [87.173.254.82]) by nsi67.de (Postfix) with ESMTP id 397CF780357; Sat, 11 Apr 2009 23:35:09 +0200 (CEST) Received: from echo.mueller-schleicher.i (echo [192.168.178.5]) by bravo.mueller-schleicher.i (Postfix) with ESMTP id 0FCADFC7E5; Sat, 11 Apr 2009 23:35:05 +0200 (CEST) Received: by echo.mueller-schleicher.i (Postfix, from userid 1000) id B6E3B4B00B8; Sat, 11 Apr 2009 23:35:04 +0200 (CEST) To: Stefan Monnier Cc: Ralph Schleicher , 2951@debbugs.gnu.org Subject: Re: bug#2951: Suggestion: self-evaluating-p function Organization: Ralph Schleicher, Freelance Engineer References: <87myaogpr8.fsf@echo.mueller-schleicher.i> From: Ralph Schleicher Date: Sat, 11 Apr 2009 23:35:04 +0200 In-Reply-To: (Stefan Monnier's message of "Sat\, 11 Apr 2009 08\:53\:45 -0400") Message-ID: <87r5zy7u2f.fsf@echo.mueller-schleicher.i> User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Stefan Monnier writes: >> I would like to have a 'self-evaluating-p' function in Emacs to check >> whether or not a value has to be quoted. > > I'm not necessarily opposed, but I'd first hear some arguments > explaining why/when one would need that. Okay, this is probably best explained by an example. I'm working on an Emacs package for parsing numbers in a flexible way. That means the regular expression string matching a number is a function of the selected numeral system and set of numbers to match. While some numeral systems have really different notations for numbers, other systems are quite close to each other. This is especially true for numeral systems of programming languages. Therefore it is natural to define related numeral systems by inheritance: (define-numeral-system Fortran '((number-numerals "0123456789") (number-zero "0") (number-plus "+") (number-minus "-") (number-radix ".") (number-exponent "DEde") ;; ... ) "Numeral system for the Fortran programming language.") (define-numeral-system C (with-numeral-system 'Fortran (setq number-exponent "Ee") ;; ... (numeral-system-bindings t)) "Numeral system for the C programming language.") The 'with-numeral-system' macro and 'numeral-system-bindings' function are defined as follows. (defmacro with-numeral-system (name &rest body) "Evaluate BODY within numeral system NAME." `(let ,(numeral-system-bindings (eval name)) ,@body)) (defun numeral-system-bindings (name) "Return the variable bindings for a numeral system. Argument NAME is the symbolic name of a numeral system (a symbol). A value of nil means to bind all symbols to nil, t means to bind all symbols to their current value, and `default' means to bind all symbols to their default values. Return value is a `let'-like list of variable bindings." (cond ;; ... ((eq name t) (let (value) (mapcar (lambda (symbol) (setq value (symbol-value symbol)) ;;;; ==> (list symbol (if (self-evaluating-p value) value (list 'quote value)))) numeral-system-variables))) ;; ... )) I noticed that if I don't check for a self-evaluating form here, the variable bindings for a numeral system are improperly quoted in the alist of numeral systems. I hope these explanations are clear enough. -- Ralph From monnier@iro.umontreal.ca Mon Apr 13 10:49:16 2009 Received: (at 2951) by emacsbugs.donarmstrong.com; 13 Apr 2009 17:49:17 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-0.5 required=4.0 tests=HAS_BUG_NUMBER,XIRONPORT autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from ironport2-out.teksavvy.com (ironport2-out.pppoe.ca [206.248.154.182]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n3DHn9kd030079 for <2951@emacsbugs.donarmstrong.com>; Mon, 13 Apr 2009 10:49:10 -0700 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AiAFAK8X40lLd+7D/2dsb2JhbACBUstZg3wGhRY X-IronPort-AV: E=Sophos;i="4.40,180,1238990400"; d="scan'208";a="36964848" Received: from 75-119-238-195.dsl.teksavvy.com (HELO ceviche.home) ([75.119.238.195]) by ironport2-out.teksavvy.com with ESMTP; 13 Apr 2009 13:49:03 -0400 Received: by ceviche.home (Postfix, from userid 20848) id 4199370764; Mon, 13 Apr 2009 13:49:03 -0400 (EDT) From: Stefan Monnier To: Ralph Schleicher Cc: 2951@debbugs.gnu.org Subject: Re: bug#2951: Suggestion: self-evaluating-p function Message-ID: References: <87myaogpr8.fsf@echo.mueller-schleicher.i> <87r5zy7u2f.fsf@echo.mueller-schleicher.i> Date: Mon, 13 Apr 2009 13:49:03 -0400 In-Reply-To: <87r5zy7u2f.fsf@echo.mueller-schleicher.i> (Ralph Schleicher's message of "Sat, 11 Apr 2009 23:35:04 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.92 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii > (list symbol (if (self-evaluating-p value) > value > (list 'quote value)))) Why not just (list symbol (list 'quote value))) ? Stefan From ralph@mueller-schleicher.de Mon Apr 13 14:05:02 2009 Received: (at 2951) by emacsbugs.donarmstrong.com; 13 Apr 2009 21:05:03 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-3.0 required=4.0 tests=HAS_BUG_NUMBER autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from nsi67.de (nsi67.de [85.31.187.140]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n3DL4vRt020654 for <2951@emacsbugs.donarmstrong.com>; Mon, 13 Apr 2009 14:04:59 -0700 Received: from bravo.mueller-schleicher.i (p57ADC28D.dip.t-dialin.net [87.173.194.141]) by nsi67.de (Postfix) with ESMTP id BBBDD780551; Mon, 13 Apr 2009 23:04:59 +0200 (CEST) Received: from echo.mueller-schleicher.i (echo [192.168.178.5]) by bravo.mueller-schleicher.i (Postfix) with ESMTP id 9428FFC7E7; Mon, 13 Apr 2009 23:04:55 +0200 (CEST) Received: by echo.mueller-schleicher.i (Postfix, from userid 1000) id 3C8054B00C3; Mon, 13 Apr 2009 23:04:55 +0200 (CEST) To: Stefan Monnier Cc: 2951@debbugs.gnu.org Subject: Re: bug#2951: Suggestion: self-evaluating-p function Organization: Ralph Schleicher, Freelance Engineer References: <87myaogpr8.fsf@echo.mueller-schleicher.i> <87r5zy7u2f.fsf@echo.mueller-schleicher.i> From: Ralph Schleicher Date: Mon, 13 Apr 2009 23:04:55 +0200 In-Reply-To: (Stefan Monnier's message of "Mon\, 13 Apr 2009 13\:49\:03 -0400") Message-ID: <87ab6k6z9k.fsf@echo.mueller-schleicher.i> User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Stefan Monnier writes: >> (list symbol (if (self-evaluating-p value) >> value >> (list 'quote value)))) > > Why not just (list symbol (list 'quote value))) ? Yes, this was my first attempt, too. But I got puzzled whether or not the extra quote matters in any way, especiall with lambda expressions. Since I couldn't find a satisfactory answer in the Elisp reference manual, I decided to get rid of it just to be save. So, If you tell me that the quote does no harm no matter what Lisp object is quoted, I can live without a self-evaluating-p function. -- Ralph From monnier@iro.umontreal.ca Mon Apr 13 19:06:30 2009 Received: (at 2951) by emacsbugs.donarmstrong.com; 14 Apr 2009 02:06:30 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-0.5 required=4.0 tests=HAS_BUG_NUMBER,XIRONPORT autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from ironport2-out.teksavvy.com (ironport2-out.pppoe.ca [206.248.154.182]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n3E26Q61005109 for <2951@emacsbugs.donarmstrong.com>; Mon, 13 Apr 2009 19:06:28 -0700 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AiAFAN+M40lLd+7D/2dsb2JhbACBUstVg3wGhRY X-IronPort-AV: E=Sophos;i="4.40,182,1238990400"; d="scan'208";a="36991950" Received: from 75-119-238-195.dsl.teksavvy.com (HELO pastel.home) ([75.119.238.195]) by ironport2-out.teksavvy.com with ESMTP; 13 Apr 2009 22:06:20 -0400 Received: by pastel.home (Postfix, from userid 20848) id A165180F1; Mon, 13 Apr 2009 22:06:20 -0400 (EDT) From: Stefan Monnier To: Ralph Schleicher Cc: 2951@debbugs.gnu.org Subject: Re: bug#2951: Suggestion: self-evaluating-p function Message-ID: References: <87myaogpr8.fsf@echo.mueller-schleicher.i> <87r5zy7u2f.fsf@echo.mueller-schleicher.i> <87ab6k6z9k.fsf@echo.mueller-schleicher.i> Date: Mon, 13 Apr 2009 22:06:20 -0400 In-Reply-To: <87ab6k6z9k.fsf@echo.mueller-schleicher.i> (Ralph Schleicher's message of "Mon, 13 Apr 2009 23:04:55 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.92 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii >>> (list symbol (if (self-evaluating-p value) >>> value >>> (list 'quote value)))) >> >> Why not just (list symbol (list 'quote value))) ? > Yes, this was my first attempt, too. But I got puzzled whether > or not the extra quote matters in any way, especiall with lambda > expressions. Since I couldn't find a satisfactory answer in the > Elisp reference manual, I decided to get rid of it just to be save. > So, If you tell me that the quote does no harm no matter what Lisp > object is quoted, I can live without a self-evaluating-p function. By definition (self-evaluating-p VALUE) tests whether evaluating VALUE or evaluating (quote VALUE) will return the same thing. I.e. the quote does no harm. Stefan From ralph@mueller-schleicher.de Tue Apr 14 09:53:51 2009 Received: (at 2951) by emacsbugs.donarmstrong.com; 14 Apr 2009 16:53:51 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-3.0 required=4.0 tests=HAS_BUG_NUMBER autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from nsi67.de (nsi67.de [85.31.187.140]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n3EGrlDI025756 for <2951@emacsbugs.donarmstrong.com>; Tue, 14 Apr 2009 09:53:48 -0700 Received: from bravo.mueller-schleicher.i (p57ADC12A.dip.t-dialin.net [87.173.193.42]) by nsi67.de (Postfix) with ESMTP id 06C7A780602; Tue, 14 Apr 2009 18:53:49 +0200 (CEST) Received: from echo.mueller-schleicher.i (echo [192.168.178.5]) by bravo.mueller-schleicher.i (Postfix) with ESMTP id B52D1FC7E9; Tue, 14 Apr 2009 18:53:45 +0200 (CEST) Received: by echo.mueller-schleicher.i (Postfix, from userid 1000) id 914374B00C3; Tue, 14 Apr 2009 18:53:45 +0200 (CEST) To: Stefan Monnier Cc: 2951@debbugs.gnu.org Subject: Re: bug#2951: Suggestion: self-evaluating-p function Organization: Ralph Schleicher, Freelance Engineer References: <87myaogpr8.fsf@echo.mueller-schleicher.i> <87r5zy7u2f.fsf@echo.mueller-schleicher.i> <87ab6k6z9k.fsf@echo.mueller-schleicher.i> From: Ralph Schleicher Date: Tue, 14 Apr 2009 18:53:45 +0200 In-Reply-To: (Stefan Monnier's message of "Mon\, 13 Apr 2009 22\:06\:20 -0400") Message-ID: <877i1n18iu.fsf@echo.mueller-schleicher.i> User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Stefan Monnier writes: >>>> (list symbol (if (self-evaluating-p value) >>>> value >>>> (list 'quote value)))) >>> >>> Why not just (list symbol (list 'quote value))) ? > >> Yes, this was my first attempt, too. But I got puzzled whether >> or not the extra quote matters in any way, especiall with lambda >> expressions. Since I couldn't find a satisfactory answer in the >> Elisp reference manual, I decided to get rid of it just to be save. > >> So, If you tell me that the quote does no harm no matter what Lisp >> object is quoted, I can live without a self-evaluating-p function. > > By definition (self-evaluating-p VALUE) tests whether evaluating VALUE > or evaluating (quote VALUE) will return the same thing. > I.e. the quote does no harm. Okay, thank you for your patience. -- Ralph From debbugs-submit-bounces@debbugs.gnu.org Tue Jan 19 20:40:54 2010 Received: (at control) by debbugs.gnu.org; 20 Jan 2010 01:40:54 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NXPYz-0007Wd-5s for submit@debbugs.gnu.org; Tue, 19 Jan 2010 20:40:53 -0500 Received: from fencepost.gnu.org ([140.186.70.10]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NXPYl-0007WW-Uj for control@debbugs.gnu.org; Tue, 19 Jan 2010 20:40:52 -0500 Received: from rgm by fencepost.gnu.org with local (Exim 4.69) (envelope-from ) id 1NXPYi-0007Sl-Bs; Tue, 19 Jan 2010 20:40:36 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <19286.24340.350706.582414@gargle.gargle.HOWL> Date: Tue, 19 Jan 2010 20:40:36 -0500 From: Glenn Morris To: control Subject: control X-Attribution: GM X-Mailer: VM (www.wonderworks.com/vm), GNU Emacs (www.gnu.org/software/emacs) X-Hue: cyan X-Ran: 8WU:4P)DBN*0i&7=5k?sw9O_ List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -5.0 (-----) close 2951 tags 4206 moreinfo tags 3098 patch tags 2499 patch tags 5297 patch tags 5290 patch tags 1975 patch tags 4470 patch tags 5055 patch tags 3541 patch tags 2527 patch tags 5119 patch tags 2404 patch From unknown Fri Jun 20 18:15:31 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Wed, 17 Feb 2010 12:24:03 +0000 User-Agent: Fakemail v42.6.9 # A New Hope # A long time ago, in a galaxy far, far away # something happened. # # Magically this resulted in the following # action being taken, but this fake control # message doesn't tell you why it happened # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator