From: Luc Teirlinck <teirllm@dms.auburn.edu>
Cc: bug-gnu-emacs@gnu.org
Subject: confusion over undocumented syntax-table features, font-lock and syntax-tables
Date: Sat, 15 Feb 2003 17:37:26 -0600 (CST) [thread overview]
Message-ID: <200302152337.RAA15707@eel.dms.auburn.edu> (raw)
Matthew Smith wrote:
One question remains, which may yet be bug of some kind:
What is the meaning of assigning a matching char to chars in syntax
class comment-starter (`<') or string-quote (`"')? Several packages,
including sh-script.el, make such an assignment, but I do not see that
the meaning of matching chars is documented except for syntax classes
open-parenthesis and close-parenthesis.
The Elisp manual indeed says:
A syntax descriptor is a Lisp string that specifies a syntax class,
a matching character (used only for the parenthesis classes) and flags.
Hence there indeed is either an inaccuracy in the Elisp manual and the
various documentation strings you alluded to in your prior posting or
the usage in the packages you mentioned is inappropriate.
I do not know which of the two alternatives applies. However, use of
a matching character for comment starter and ender seems to make at
least some sense to me. For string quote, it seems really strange.
The Elisp manual says:
- Syntax class: string quote
"String quote characters" (designated by `"') are used in many
languages, including Lisp and C, to delimit string constants.
The same string quote character appears at the beginning and the
end of a string. Such quoted strings do not nest.
Thus, if a package mentions the identical character as a matcher, then
this seems totally redundant. If it mentions another character, it
seems dangerous (at least to me), since plenty of Lisp code might
expect the identical character to match, relying on the above quote.
Sincerely,
Luc.
next reply other threads:[~2003-02-15 23:37 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-02-15 23:37 Luc Teirlinck [this message]
2003-02-16 5:46 ` confusion over undocumented syntax-table features, font-lock and syntax-tables Matt Swift
[not found] <mailman.1933.1045148974.21513.bug-gnu-emacs@gnu.org>
2003-02-15 20:11 ` Matt Swift
-- strict thread matches above, loose matches on Subject: below --
2003-02-13 15:09 Luc Teirlinck
2003-02-13 4:17 Luc Teirlinck
2003-02-13 3:43 Luc Teirlinck
2003-02-11 5:08 Matthew Swift
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=200302152337.RAA15707@eel.dms.auburn.edu \
--to=teirllm@dms.auburn.edu \
--cc=bug-gnu-emacs@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.