From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Kastrup Newsgroups: gmane.emacs.devel Subject: Re: "simplifications" Date: Mon, 19 Nov 2007 17:02:48 +0100 Message-ID: <86hcjixlxz.fsf@lola.quinscape.zz> References: <86ejem1pig.fsf@lola.quinscape.zz> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1195488264 22043 80.91.229.12 (19 Nov 2007 16:04:24 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 19 Nov 2007 16:04:24 +0000 (UTC) Cc: Juanma Barranquero , emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Nov 19 17:04:30 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1Iu96m-0001nn-7r for ged-emacs-devel@m.gmane.org; Mon, 19 Nov 2007 17:04:24 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Iu96Y-0004Zv-F0 for ged-emacs-devel@m.gmane.org; Mon, 19 Nov 2007 11:04:10 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Iu95O-0003Pm-Oo for emacs-devel@gnu.org; Mon, 19 Nov 2007 11:02:58 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Iu95M-0003Nj-R9 for emacs-devel@gnu.org; Mon, 19 Nov 2007 11:02:58 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Iu95M-0003NI-Dd for emacs-devel@gnu.org; Mon, 19 Nov 2007 11:02:56 -0500 Original-Received: from pc3.berlin.powerweb.de ([62.67.228.11]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Iu95L-0005St-K8 for emacs-devel@gnu.org; Mon, 19 Nov 2007 11:02:56 -0500 Original-Received: from quinscape.de (mail.quinscape.de [212.29.44.217]) by pc3.berlin.powerweb.de (8.9.3p3/8.9.3) with ESMTP id RAA18033 for ; Mon, 19 Nov 2007 17:02:47 +0100 X-Delivered-To: Original-Received: (qmail-ldap/ctrl 24315 invoked from network); 19 Nov 2007 16:02:49 -0000 Original-Received: from unknown (HELO lola.quinscape.zz) ([10.0.3.43]) (envelope-sender ) by ns.quinscape.de (qmail-ldap-1.03) with SMTP for ; 19 Nov 2007 16:02:48 -0000 Original-Received: by lola.quinscape.zz (Postfix, from userid 1001) id 9134DF9945; Mon, 19 Nov 2007 17:02:48 +0100 (CET) In-Reply-To: (Stefan Monnier's message of "Mon\, 19 Nov 2007 10\:44\:27 -0500") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/23.0.50 (gnu/linux) X-AntiVirus: checked by AntiVir MailGate (version: 2.1.3-2; AVE: 7.6.0.34; VDF: 7.0.0.232; host: quinx) X-detected-kernel: by monty-python.gnu.org: Linux 2.4-2.6 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:83663 Archived-At: Stefan Monnier writes: >>> it doesn't account for the case where >>> you do >>> (defsubst cadr (debug-on-error) (car (cdr debug-on-error))) >>> in which case the optimization is not semantics preserving" > >> And I'n not sure it should... I think I agree with David here: if >> you're using defsubst to optimize, you should expect some gotchas. > > Well, my optimization is not specific to defsubst, so it will also > remove the let-binding in: > > (let ((debug-on-error t)) > (car (car (cdr x)))) > > > In any case, if you want a "fast and loose" defsubst, it's there already > under the name defsubst*. For a suitable value of "there": (describe-function 'defsubst*) Debugger entered--Lisp error: (void-function defsubst*) describe-function-1(defsubst*) describe-function(defsubst*) eval((describe-function (quote defsubst*))) eval-last-sexp-1(nil) eval-last-sexp(nil) call-interactively(eval-last-sexp) -- David Kastrup