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: Tue, 23 Nov 2004 08:55:13 -0500 Message-ID: References: <87mzxoc8bi.fsf-monnier+emacs@gnu.org> <87brdqe88y.fsf-monnier+emacs@gnu.org> <87is7xozd8.fsf@jurta.org> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1101218168 5890 80.91.229.6 (23 Nov 2004 13:56:08 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 23 Nov 2004 13:56:08 +0000 (UTC) Cc: emacs-devel@gnu.org, rms@gnu.org, storm@cua.dk Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Nov 23 14:55:53 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 1CWb97-0005bD-00 for ; Tue, 23 Nov 2004 14:55:53 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CWbID-0000pL-Al for ged-emacs-devel@m.gmane.org; Tue, 23 Nov 2004 09:05:17 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CWbHs-0000or-5W for emacs-devel@gnu.org; Tue, 23 Nov 2004 09:04:56 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CWbHq-0000nj-0B for emacs-devel@gnu.org; Tue, 23 Nov 2004 09:04:54 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CWbHp-0000nQ-Q3 for emacs-devel@gnu.org; Tue, 23 Nov 2004 09:04:53 -0500 Original-Received: from [206.47.199.164] (helo=simmts6-srv.bellnexxia.net) by monty-python.gnu.org with esmtp (Exim 4.34) id 1CWb8V-0003jJ-Bg; Tue, 23 Nov 2004 08:55:15 -0500 Original-Received: from empanada.home ([65.92.240.220]) by simmts6-srv.bellnexxia.net (InterMail vM.5.01.06.10 201-253-122-130-110-20040306) with ESMTP id <20041123135514.XTF1597.simmts6-srv.bellnexxia.net@empanada.home>; Tue, 23 Nov 2004 08:55:14 -0500 Original-Received: by empanada.home (Postfix, from userid 502) id DE62A381753; Tue, 23 Nov 2004 08:55:13 -0500 (EST) Original-To: Juri Linkov In-Reply-To: <87is7xozd8.fsf@jurta.org> (Juri Linkov's message of "Tue, 23 Nov 2004 08:27:55 +0200") 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:30280 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:30280 > but this code is really bad, since it uses raw enum values 4 and 5 > which are nowhere documented and too implementation specific. It's documented in the elisp manual. > You already proposed a new function `syntax-class'. This would > improve the code. Yes, but I have no time to devote to this for now. I think focusing on getting to a release is a better use of my time. > I also think there should exist another function returning a complete > syntax string with all flags (e.g. `syntax-to-string'). What for? > Such C function could be created from `internal-describe-syntax-value' > (up to the line inserting "\twhich means:") with moving the rest of > the code in `internal-describe-syntax-value' (which just inserts > a readable syntax description) to Lisp side (e.g. to subr.el). I consciously decided to keep it in C when I introduced internal-describe-syntax-value, for two reasons: 1 - the code was there and there didn't seem to be any strong need to move it. 2 - any addition/removal/change of syntax codes or syntax-flags would involve changes in syntax.c but pretty much nowhere else, and I think it's good to keep it that way. Note also that given the cost of converting (from and) back to a string and the inconvenience of manipulating this string, I recommend you try to avoid writing code that uses such strings and instead try to work directly with the internal representation. Stefan