From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Stefan Newsgroups: gmane.emacs.devel Subject: Re: syntax-after Date: Sat, 13 Nov 2004 18:55:47 -0500 Message-ID: References: <87mzxoc8bi.fsf-monnier+emacs@gnu.org> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1100390201 12563 80.91.229.6 (13 Nov 2004 23:56:41 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 13 Nov 2004 23:56:41 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Nov 14 00:56:31 2004 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1CT7kt-0004kb-00 for ; Sun, 14 Nov 2004 00:56:31 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CT7tV-0001Kj-Ew for ged-emacs-devel@m.gmane.org; Sat, 13 Nov 2004 19:05:25 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CT7tD-0001Ke-4y for emacs-devel@gnu.org; Sat, 13 Nov 2004 19:05:07 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CT7tB-0001KS-Ss for emacs-devel@gnu.org; Sat, 13 Nov 2004 19:05:06 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CT7tB-0001KP-0O for emacs-devel@gnu.org; Sat, 13 Nov 2004 19:05:05 -0500 Original-Received: from [206.47.199.163] (helo=simmts5-srv.bellnexxia.net) by monty-python.gnu.org with esmtp (Exim 4.34) id 1CT7kH-0002EC-1J; Sat, 13 Nov 2004 18:55:53 -0500 Original-Received: from empanada.home ([67.71.26.166]) by simmts5-srv.bellnexxia.net (InterMail vM.5.01.06.10 201-253-122-130-110-20040306) with ESMTP id <20041113235552.LRHP1614.simmts5-srv.bellnexxia.net@empanada.home>; Sat, 13 Nov 2004 18:55:52 -0500 Original-Received: by empanada.home (Postfix, from userid 502) id E14613671E5; Sat, 13 Nov 2004 18:55:47 -0500 (EST) Original-To: rms@gnu.org In-Reply-To: (Richard Stallman's message of "Fri, 12 Nov 2004 16:25:21 -0500") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/21.3.50 (darwin) 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: main.gmane.org gmane.emacs.devel:29802 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:29802 > It is not new. My change makes it compatible with char-syntax, which > is why I did it. But the code you used is not compatible with `char-syntax'. To be compatible with `char-syntax' you'd have to drop the "matching paren" (i.e. the cdr of the data) as well as the flags. I don't think that hiding this "side" info would be a good idea either. I.e. I think syntax-after should return the "raw" data as before (after all that's why I wrote it like that originally). If you find this raw data to be intimidating, we should provide another function `syntax-class' such that (syntax-class (syntax-after)) == (char-syntax (char-after)) or something along these lines. > It is also more comparible with the way modify-syntax-entry works, since > the same character is used now by both. > This change reduces the number of representations of the syntax by > one, as far as I know. Or is there some other function that uses the > old representation of syntax-after? If so, perhaps it should be > changed too. The raw representation (i.e. the cons cell representation used inside the chartables used as syntax-tables) does appear at various places (it appears if you do (aref ?\[) or if you lookup the `syntax-table' text-property, it is used in font-lock-syntactic-keywords for code that needs to work on Emacs-20, ...) and it seems difficult to get rid of it now; so no, you haven't reduced the number of representations. Stefan