From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.bugs Subject: bug#4030: forward-sexp parses character literal ?; as comment Date: Wed, 05 Aug 2009 16:29:58 +0200 Message-ID: <4A799766.9050304@gmx.at> References: <1249387642.18128.1328220453@webmail.messagingengine.com> <4A782D00.4040808@gmx.at> <1249460270.18460.1328376993@webmail.messagingengine.com> Reply-To: martin rudalics , 4030@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1249483659 18550 80.91.229.12 (5 Aug 2009 14:47:39 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 5 Aug 2009 14:47:39 +0000 (UTC) Cc: 4030@emacsbugs.donarmstrong.com To: era+emacsbugs@iki.fi Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Aug 05 16:47:31 2009 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1MYhlh-0000ya-HT for geb-bug-gnu-emacs@m.gmane.org; Wed, 05 Aug 2009 16:47:05 +0200 Original-Received: from localhost ([127.0.0.1]:49717 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MYhlg-0003y9-JC for geb-bug-gnu-emacs@m.gmane.org; Wed, 05 Aug 2009 10:47:04 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MYhlb-0003xe-CX for bug-gnu-emacs@gnu.org; Wed, 05 Aug 2009 10:46:59 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MYhlW-0003wi-6i for bug-gnu-emacs@gnu.org; Wed, 05 Aug 2009 10:46:59 -0400 Original-Received: from [199.232.76.173] (port=57559 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MYhlW-0003wf-4L for bug-gnu-emacs@gnu.org; Wed, 05 Aug 2009 10:46:54 -0400 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:39518) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MYhlU-0005lN-Ve for bug-gnu-emacs@gnu.org; Wed, 05 Aug 2009 10:46:53 -0400 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n75Ekl3g018346; Wed, 5 Aug 2009 07:46:47 -0700 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.14.3/8.14.3/Submit) id n75EZ7c1017387; Wed, 5 Aug 2009 07:35:07 -0700 X-Loop: owner@emacsbugs.donarmstrong.com Resent-From: martin rudalics Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Wed, 05 Aug 2009 14:35:07 +0000 Resent-Message-ID: Resent-Sender: owner@emacsbugs.donarmstrong.com X-Emacs-PR-Message: followup 4030 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by 4030-submit@emacsbugs.donarmstrong.com id=B4030.124948264717266 (code B ref 4030); Wed, 05 Aug 2009 14:35:07 +0000 Original-Received: (at 4030) by emacsbugs.donarmstrong.com; 5 Aug 2009 14:30:47 +0000 X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. Original-Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with SMTP id n75EUeQi017255 for <4030@emacsbugs.donarmstrong.com>; Wed, 5 Aug 2009 07:30:42 -0700 Original-Received: (qmail invoked by alias); 05 Aug 2009 14:30:35 -0000 Original-Received: from 62-47-55-223.adsl.highway.telekom.at (EHLO [62.47.55.223]) [62.47.55.223] by mail.gmx.net (mp070) with SMTP; 05 Aug 2009 16:30:35 +0200 X-Authenticated: #14592706 X-Provags-ID: V01U2FsdGVkX18laUMnJmElGRXcElD8saxx+tzYfRyk0YqdQ9xzLF E7uRe4LEyvj8FU User-Agent: Thunderbird 2.0.0.21 (Windows/20090302) In-Reply-To: <1249460270.18460.1328376993@webmail.messagingengine.com> X-Y-GMX-Trusted: 0 X-FuHaFi: 0.68 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) Resent-Date: Wed, 05 Aug 2009 10:46:59 -0400 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:29901 Archived-At: > 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