From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: bojohan+news@dd.chalmers.se (Johan =?utf-8?Q?Bockg=C3=A5rd?=) Newsgroups: gmane.emacs.devel Subject: Re: Patch: Syntax and Hard Newlines Date: Thu, 23 Nov 2006 10:33:05 +0100 Message-ID: References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: sea.gmane.org 1164415588 32063 80.91.229.2 (25 Nov 2006 00:46:28 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 25 Nov 2006 00:46:28 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Nov 25 01:46:25 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1GnlgW-0002mp-9D for ged-emacs-devel@m.gmane.org; Sat, 25 Nov 2006 01:46:24 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GnlgV-0000ja-T8 for ged-emacs-devel@m.gmane.org; Fri, 24 Nov 2006 19:46:23 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GnlgJ-0000i5-AP for emacs-devel@gnu.org; Fri, 24 Nov 2006 19:46:11 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GnlgI-0000hG-PY for emacs-devel@gnu.org; Fri, 24 Nov 2006 19:46:10 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GnlgI-0000h9-Ez for emacs-devel@gnu.org; Fri, 24 Nov 2006 19:46:10 -0500 Original-Received: from [199.232.41.67] (helo=mx20.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1GnlgI-0006W3-Hc for emacs-devel@gnu.org; Fri, 24 Nov 2006 19:46:10 -0500 Original-Received: from [80.91.229.2] (helo=ciao.gmane.org) by mx20.gnu.org with esmtp (Exim 4.52) id 1GnB0X-0007el-S6 for emacs-devel@gnu.org; Thu, 23 Nov 2006 04:36:38 -0500 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1GnAxG-00050Q-Sa for emacs-devel@gnu.org; Thu, 23 Nov 2006 10:33:15 +0100 Original-Received: from gamma02.me.chalmers.se ([129.16.50.72]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 23 Nov 2006 10:33:14 +0100 Original-Received: from bojohan+news by gamma02.me.chalmers.se with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 23 Nov 2006 10:33:14 +0100 X-Injected-Via-Gmane: http://gmane.org/ Mail-Followup-To: emacs-devel@gnu.org Original-To: emacs-devel@gnu.org Original-Lines: 43 Original-X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: gamma02.me.chalmers.se Mail-Copies-To: never User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/22.0.90 (gnu/linux) Cancel-Lock: sha1:wGfAzpum8PhkmSGocemxpMBThX8= 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:62754 Archived-At: Richard Stallman writes: > However, unlike `assoc' which returns the matching cons, > `assoc-default' returns the cdr. In the code in question it is always > nil. > > Does this code work right? > > *** bytecomp.el 08 Jul 2006 16:59:45 -0400 2.186 > --- bytecomp.el 16 Nov 2006 08:24:45 -0500 > *************** > *** 2864,2871 **** > > (defmacro byte-compile-get-constant (const) > `(or (if (stringp ,const) > ! (assoc-default ,const byte-compile-constants > ! 'equal-including-properties nil) > (assq ,const byte-compile-constants)) > (car (setq byte-compile-constants > (cons (list ,const) byte-compile-constants))))) > --- 2864,2875 ---- > > (defmacro byte-compile-get-constant (const) > `(or (if (stringp ,const) > ! ;; In a string constant, treat properties as significant. > ! (let (result) > ! (dolist (elt byte-compile-constants) > ! (if (equal-including-properties (car elt) ,const) > ! (setq result elt))) > ! result) > (assq ,const byte-compile-constants)) > (car (setq byte-compile-constants > (cons (list ,const) byte-compile-constants))))) I think so. Also, Chong removed the "Prevent byte compiler from causing spurious string sharing when it optimizes away calls to functions such as concat" note from FOR-RELEASE, but it doesn't seem like anything was done about it. -- Johan Bockgård