From: Stefan <monnier@iro.umontreal.ca>
Cc: emacs-devel@gnu.org
Subject: Re: syntax-after
Date: Sat, 13 Nov 2004 18:55:47 -0500 [thread overview]
Message-ID: <m1k6spz59x.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <E1CSiv3-0000kT-6i@fencepost.gnu.org> (Richard Stallman's message of "Fri, 12 Nov 2004 16:25:21 -0500")
> 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 <syntax-table> ?\[) 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
next prev parent reply other threads:[~2004-11-13 23: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 ` Stefan [this message]
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 ` syntax-after Stefan
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m1k6spz59x.fsf-monnier+emacs@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=emacs-devel@gnu.org \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.