[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: syntax-after

From: Stefan
Subject: Re: syntax-after
Date: Tue, 23 Nov 2004 08:55:13 -0500
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/21.3.50 (darwin)

> 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.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]