unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan <monnier@iro.umontreal.ca>
Cc: emacs-devel@gnu.org, rms@gnu.org, storm@cua.dk
Subject: Re: syntax-after
Date: Tue, 23 Nov 2004 08:55:13 -0500	[thread overview]
Message-ID: <m17joc7k72.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <87is7xozd8.fsf@jurta.org> (Juri Linkov's message of "Tue, 23 Nov 2004 08:27:55 +0200")

> 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

  reply	other threads:[~2004-11-23 13:55 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-11-11 22:51 syntax-after Stefan Monnier
2004-11-11 23:38 ` syntax-after Juri Linkov
2004-11-12 21:25 ` syntax-after Richard Stallman
2004-11-13 10:57   ` syntax-after Juri Linkov
2004-11-13 23:55   ` syntax-after Stefan
2004-11-16 16:49     ` syntax-after Richard Stallman
2004-11-22  5:57       ` syntax-after Stefan Monnier
2004-11-22 10:27         ` syntax-after Kim F. Storm
2004-11-22 17:15           ` syntax-after Stefan Monnier
2004-11-23  6:27             ` syntax-after Juri Linkov
2004-11-23 13:55               ` Stefan [this message]
2004-11-23 16:30           ` syntax-after Richard Stallman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m17joc7k72.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=emacs-devel@gnu.org \
    --cc=rms@gnu.org \
    --cc=storm@cua.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).