From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#4030: forward-sexp parses character literal ?; as comment Date: Thu, 06 Aug 2009 14:51:20 -0400 Message-ID: References: <1249387642.18128.1328220453@webmail.messagingengine.com> <4A782D00.4040808@gmx.at> <1249460270.18460.1328376993@webmail.messagingengine.com> <4A799766.9050304@gmx.at> Reply-To: Stefan Monnier , 4030@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1249585676 6278 80.91.229.12 (6 Aug 2009 19:07:56 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 6 Aug 2009 19:07:56 +0000 (UTC) Cc: era+emacsbugs@iki.fi, 4030@emacsbugs.donarmstrong.com To: martin rudalics Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Aug 06 21:07:49 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 1MZ8JW-0007hE-VW for geb-bug-gnu-emacs@m.gmane.org; Thu, 06 Aug 2009 21:07:47 +0200 Original-Received: from localhost ([127.0.0.1]:45084 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MZ8JW-0006cs-G2 for geb-bug-gnu-emacs@m.gmane.org; Thu, 06 Aug 2009 15:07:46 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MZ8Ik-0006Fj-1n for bug-gnu-emacs@gnu.org; Thu, 06 Aug 2009 15:06:58 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MZ8If-0006Ck-32 for bug-gnu-emacs@gnu.org; Thu, 06 Aug 2009 15:06:57 -0400 Original-Received: from [199.232.76.173] (port=36805 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MZ8Ie-0006CO-5Y for bug-gnu-emacs@gnu.org; Thu, 06 Aug 2009 15:06:52 -0400 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:58789) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MZ8Id-0004ve-5V for bug-gnu-emacs@gnu.org; Thu, 06 Aug 2009 15:06:51 -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 n76J6l8Z019597; Thu, 6 Aug 2009 12:06:48 -0700 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.14.3/8.14.3/Submit) id n76J04Xt018118; Thu, 6 Aug 2009 12:00:04 -0700 X-Loop: owner@emacsbugs.donarmstrong.com Resent-From: Stefan Monnier Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Thu, 06 Aug 2009 19:00:04 +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.124958468817544 (code B ref 4030); Thu, 06 Aug 2009 19:00:04 +0000 Original-Received: (at 4030) by emacsbugs.donarmstrong.com; 6 Aug 2009 18:51:28 +0000 X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. Original-Received: from ironport2-out.teksavvy.com (ironport2-out.teksavvy.com [206.248.154.182]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n76IpQdX017541 for <4030@emacsbugs.donarmstrong.com>; Thu, 6 Aug 2009 11:51:27 -0700 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AuEEAGvDekpFxL8W/2dsb2JhbACBUL9bCI9wgkQIgUwFhzQ X-IronPort-AV: E=Sophos;i="4.43,335,1246852800"; d="scan'208";a="43113688" Original-Received: from 69-196-191-22.dsl.teksavvy.com (HELO ceviche.home) ([69.196.191.22]) by ironport2-out.teksavvy.com with ESMTP; 06 Aug 2009 14:51:20 -0400 Original-Received: by ceviche.home (Postfix, from userid 20848) id 87CAEB40CD; Thu, 6 Aug 2009 14:51:20 -0400 (EDT) In-Reply-To: <4A799766.9050304@gmx.at> (martin rudalics's message of "Wed, 05 Aug 2009 16:29:58 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) Resent-Date: Thu, 06 Aug 2009 15:06:57 -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:29940 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. Indeed. > 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). Pretty much, yes. > We could try to mark any `?;' or `?"' sequences appropriately when > fontifying though. We could/should/will improve the syntax parsing to handle those things properly. But it's a non-trivial amount of work, especially since every major mode has similar issues but needs different extra functionality. >> 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. Agreed, but that doesn't mean we shouldn't intend to do better: the current behavior (signalling an internal error to the user) is a bug that needs to be fixed. >> 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. Yes, clearly it deserves improvement, but that's nontrivial. Stefan