From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Chong Yidong Newsgroups: gmane.emacs.bugs Subject: bug#411: 23.0.60; flet and byte-compilation Date: Wed, 24 Sep 2008 22:16:07 -0400 Message-ID: <87wsh1x95k.fsf@cyd.mit.edu> Reply-To: Chong Yidong , 411@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1222309815 17761 80.91.229.12 (25 Sep 2008 02:30:15 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 25 Sep 2008 02:30:15 +0000 (UTC) Cc: 411@emacsbugs.donarmstrong.com To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Sep 25 04:31:13 2008 connect(): Connection refused Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1KigdK-000356-SR for geb-bug-gnu-emacs@m.gmane.org; Thu, 25 Sep 2008 04:31:11 +0200 Original-Received: from localhost ([127.0.0.1]:60351 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KigcH-0003LW-LY for geb-bug-gnu-emacs@m.gmane.org; Wed, 24 Sep 2008 22:30:05 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KigcD-0003LH-OM for bug-gnu-emacs@gnu.org; Wed, 24 Sep 2008 22:30:01 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KigcC-0003Ks-9O for bug-gnu-emacs@gnu.org; Wed, 24 Sep 2008 22:30:01 -0400 Original-Received: from [199.232.76.173] (port=58340 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KigcC-0003Kn-4y for bug-gnu-emacs@gnu.org; Wed, 24 Sep 2008 22:30:00 -0400 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:47762) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KigcB-0004b9-2F for bug-gnu-emacs@gnu.org; Wed, 24 Sep 2008 22:29:59 -0400 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m8P2TsHT019089; Wed, 24 Sep 2008 19:29:54 -0700 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.13.8/8.13.8/Submit) id m8P2P4i6018046; Wed, 24 Sep 2008 19:25:04 -0700 X-Loop: don@donarmstrong.com Resent-From: Chong Yidong Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Thu, 25 Sep 2008 02:25:04 +0000 Resent-Message-ID: Resent-Sender: don@donarmstrong.com X-Emacs-PR-Message: report 411 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by 411-submit@emacsbugs.donarmstrong.com id=B411.122230894116728 (code B ref 411); Thu, 25 Sep 2008 02:25:04 +0000 Original-Received: (at 411) by emacsbugs.donarmstrong.com; 25 Sep 2008 02:15:41 +0000 Original-Received: from cyd.mit.edu (CYD.MIT.EDU [18.115.2.24]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m8P2Fcqd016722 for <411@emacsbugs.donarmstrong.com>; Wed, 24 Sep 2008 19:15:40 -0700 Original-Received: by cyd.mit.edu (Postfix, from userid 1000) id EECF657E189; Wed, 24 Sep 2008 22:16:07 -0400 (EDT) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Resent-Date: Wed, 24 Sep 2008 22:30:01 -0400 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:20746 Archived-At: Glenn Morris wrote: > > (defun f (x y) > > (flet ((+ (a b) (- a b))) > > (+ x y))) > > > > Bytecompile it [...] > > > > Evaluate the expression (f 1 2). This should yield -1, but the result > > will be 3. > > it works to comment out the line in bytecomp.el > > (byte-defop-compiler (+ byte-plus) byte-compile-associative) > > I guess byte-compile-associative mangles the '(+ x y) form without > regard for the redefinition in effect. I don't know if that is > fixable, or should be a documented caveat with regards to primitives. I don't see how to fix this, and my inclination is to just document this limitation in the docstring of `flet'. Stefan, WDYT?