From: martin rudalics <rudalics@gmx.at>
To: era+emacsbugs@iki.fi
Cc: 4030@emacsbugs.donarmstrong.com
Subject: bug#4030: forward-sexp parses character literal ?; as comment
Date: Wed, 05 Aug 2009 16:29:58 +0200 [thread overview]
Message-ID: <4A799766.9050304@gmx.at> (raw)
In-Reply-To: <1249460270.18460.1328376993@webmail.messagingengine.com>
> While the workaround is good (and documented in the Ubuntu bug as well),
> the ability of Customize depends on this code working correctly, and it
> should handle any nominally well-formed .emacs file. Perhaps there are
> other pieces of code which rely on forward-sexp et alii for Emacs Lisp
> parsing as well.
Using a backslash _is_ the canonical way for handling this problem. If
some part of Emacs puts such a semicolon into an Elisp buffer without
escaping it, then that part of Emacs is wrong and has to be fixed. If
you manually insert such a construct, then you are on your own (just as
when within a string you put a left paren in column zero). We could try
to mark any `?;' or `?"' sequences appropriately when fontifying though.
> I'll also point out that an "Unbalanced parentheses" error from deep
> inside Customize is not a very helpful error message (especially as it
> does not indicate in which buffer the unbalanced parentheses were
> found); but perhaps Customize should be adapted to cope if forward-sexp
> cannot easily be fixed.
Getting good diagnostics after a parsing error is hard.
> It appears that src/syntax.c could perhaps be adapted to take into
> account character literals as well as quoted strings, but I am not
> familiar enough with Emacs internals to tell whether this is really a
> feasible approach.
Let's say we give `?' character quote syntax in Elisp. I suppose this
could be done. But someone would have to rewrite the corresponding
parts of the parsing code. I'm afraid there's hardly anyone around to
volunteer. (And think of an `?' escaping a subsequent backslash.)
martin
next prev parent reply other threads:[~2009-08-05 14:29 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-04 12:07 bug#4030: forward-sexp parses character literal ?; as comment era+emacsbugs
2009-08-04 12:43 ` martin rudalics
2009-08-05 8:17 ` era+emacsbugs
2009-08-05 14:29 ` martin rudalics [this message]
2009-08-06 8:55 ` era+emacsbugs
2009-08-06 18:51 ` Stefan Monnier
2009-08-07 13:01 ` martin rudalics
2009-08-10 19:59 ` Stefan Monnier
2009-08-11 9:17 ` martin rudalics
2016-06-18 3:47 ` Andrew Hyatt
2016-06-18 4:31 ` Stefan Monnier
2017-05-13 2:55 ` npostavs
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=4A799766.9050304@gmx.at \
--to=rudalics@gmx.at \
--cc=4030@emacsbugs.donarmstrong.com \
--cc=era+emacsbugs@iki.fi \
/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).