From unknown Tue Aug 19 05:12:27 2025 X-Loop: help-debbugs@gnu.org Subject: bug#14589: 24.3; lisp-mode and parenthesis in multi-line string Resent-From: andy peterson Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 11 Jun 2013 15:49:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 14589 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 14589@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.13709657303693 (code B ref -1); Tue, 11 Jun 2013 15:49:01 +0000 Received: (at submit) by debbugs.gnu.org; 11 Jun 2013 15:48:50 +0000 Received: from localhost ([127.0.0.1]:56630 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1UmQoT-0000xR-BJ for submit@debbugs.gnu.org; Tue, 11 Jun 2013 11:48:49 -0400 Received: from eggs.gnu.org ([208.118.235.92]:33812) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1UmP0i-00032c-Sr for submit@debbugs.gnu.org; Tue, 11 Jun 2013 09:53:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UmP0L-0005gg-V9 for submit@debbugs.gnu.org; Tue, 11 Jun 2013 09:53:00 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM, HTML_MESSAGE autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:56370) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UmP0L-0005gc-Rx for submit@debbugs.gnu.org; Tue, 11 Jun 2013 09:52:57 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35491) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UmP0I-00070f-Gi for bug-gnu-emacs@gnu.org; Tue, 11 Jun 2013 09:52:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UmP0A-0005dQ-HH for bug-gnu-emacs@gnu.org; Tue, 11 Jun 2013 09:52:54 -0400 Received: from if04-mail-sr10-mia.mta.terra.com ([208.84.243.57]:41642) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UmP0A-0005d6-Aj for bug-gnu-emacs@gnu.org; Tue, 11 Jun 2013 09:52:46 -0400 Received: from 1p8.tpn.terra.com (unknown [10.235.200.37]) by mail-sr10-mia.tpn.terra.com (Postfix) with ESMTP id 12AF76002331 for ; Tue, 11 Jun 2013 13:52:45 +0000 (UTC) X-Terra-Karma: -2% X-Terra-Hash: df001dd65c3962cb8661349d57f72764 Received: from [192.168.1.4] (201-25-82-25.cbace702.dsl.brasiltelecom.net.br [201.25.82.25]) (authenticated user andrewp@terra.com.br) by 1p8.tpn.terra.com (Postfix) with ESMTPA id 4E1D880170BB2 for ; Tue, 11 Jun 2013 13:52:43 +0000 (UTC) Message-ID: <51B72BA9.9050400@terra.com.br> Date: Tue, 11 Jun 2013 09:52:41 -0400 From: andy peterson User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130510 Thunderbird/17.0.6 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="------------010105030604060504040909" X-Milter-Version: master.39-g1fd3ecd+ X-CLX-Rate-Response: fh=1p8; fi=10.235.200.246:2001; rg=B; GT=0; fs=1011; PS=bug-gnu-emacs@gnu.org:0; ns=0; id=BFBsyWb9-5B1352il; rv=6463/208.84.242.246:14051; ts=I7NBH; fl=I; ip=201.25.82.25; he=K0oCA3VBgQl; ho=Ob7Kmzleou0; hd=C7Kebad4cDT; hf=BFbaKTVJYz8; hF=OnqoZCMKRRc; hj=G5DXYwkW4mr; hr=BmywkcNwq2u; ZB=FgKgguAf6j7; ZB=BsD2i4AFgHZ; ZB=LTlQgn+qbKV; ZB=NHsuik6VEoS; ZB=HhibdB2WhZT; ZF=HsM/lw0gqGd; X-CLX-ID: a143GLF8b3.O0VH-5B1352iI X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.1 (----) X-Mailman-Approved-At: Tue, 11 Jun 2013 11:48:48 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.1 (----) This is a multi-part message in MIME format. --------------010105030604060504040909 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 1. open emacs. emacs -q 2. open new buffer ^X b foo 3. enter lisp mode, M-x lisp-mode 4. enter the following multi-line lisp string: " () " The opening parenthesis has to be the first character on the line. Note that the opening parenthesis remains highlighted. I believe this bug has consequences for Slime and Paredit. Slime won't let me evaluate expressions with such a string. And Paredit is confused. In GNU Emacs 24.3.1 (x86_64-pc-linux-gnu, GTK+ Version 3.6.0) of 2013-04-14 on marid, modified by Debian Windowing system distributor `The X.Org Foundation --------------010105030604060504040909 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit 1. open emacs. emacs -q
2. open new buffer ^X b foo
3. enter lisp mode, M-x lisp-mode
4. enter the following multi-line lisp string:
"
()
"

The opening parenthesis has to be the first character on the line.

Note that the opening parenthesis remains highlighted.

I believe this bug has consequences for Slime and Paredit.
Slime won't let me evaluate expressions with such a string.
And Paredit is confused.



In GNU Emacs 24.3.1 (x86_64-pc-linux-gnu, GTK+ Version 3.6.0)
of 2013-04-14 on marid, modified by Debian
Windowing system distributor `The X.Org Foundation
--------------010105030604060504040909-- From unknown Tue Aug 19 05:12:27 2025 X-Loop: help-debbugs@gnu.org Subject: bug#14589: 24.3; lisp-mode and parenthesis in multi-line string Resent-From: Glenn Morris Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 11 Jun 2013 16:04:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 14589 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: andy peterson Cc: 14589@debbugs.gnu.org Received: via spool by 14589-submit@debbugs.gnu.org id=B14589.13709665856626 (code B ref 14589); Tue, 11 Jun 2013 16:04:01 +0000 Received: (at 14589) by debbugs.gnu.org; 11 Jun 2013 16:03:05 +0000 Received: from localhost ([127.0.0.1]:56676 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1UmR2G-0001io-WC for submit@debbugs.gnu.org; Tue, 11 Jun 2013 12:03:05 -0400 Received: from fencepost.gnu.org ([208.118.235.10]:33940 ident=Debian-exim) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1UmR2F-0001ie-Sb for 14589@debbugs.gnu.org; Tue, 11 Jun 2013 12:03:04 -0400 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1UmR1z-0007tt-0q; Tue, 11 Jun 2013 12:02:47 -0400 From: Glenn Morris References: <51B72BA9.9050400@terra.com.br> X-Spook: codes MDA MD4 AMEMB Capricorn USCODE brigand White House X-Ran: "l%jxAAem\6G_k,f:wYY$T{%A\-)zWj5qCp!v9n]}f?vdBlUe,tK_a"_Z,64PK/|xJ5[ZD X-Hue: black X-Attribution: GM Date: Tue, 11 Jun 2013 12:02:46 -0400 In-Reply-To: <51B72BA9.9050400@terra.com.br> (andy peterson's message of "Tue, 11 Jun 2013 09:52:41 -0400") Message-ID: User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -5.2 (-----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.2 (-----) andy peterson wrote: > 1. open emacs. emacs -q > 2. open new buffer ^X b foo > 3. enter lisp mode, M-x lisp-mode > 4. enter the following multi-line lisp string: > " > () > " > > The opening parenthesis has to be the first character on the line. > > Note that the opening parenthesis remains highlighted. This is an extremely long-standing convention. See C-h i m emacs RET i parenthesis in column zero and fontification RET Comment and string fontification (or "syntactic" fontification) relies on analysis of the syntactic structure of the buffer text. For the sake of speed, some modes, including Lisp mode, rely on a special convention: an open-parenthesis or open-brace in the leftmost column always defines the beginning of a defun, and is thus always outside any string or comment. Therefore, you should avoid placing an open-parenthesis or open-brace in the leftmost column, if it is inside a string or comment. See Left Margin Paren, for details. > I believe this bug has consequences for Slime and Paredit. > Slime won't let me evaluate expressions with such a string. > And Paredit is confused. Probably expected behaviour. You could ask the maintainers of those (external) modes about it. From debbugs-submit-bounces@debbugs.gnu.org Tue Jun 11 13:06:05 2013 Received: (at control) by debbugs.gnu.org; 11 Jun 2013 17:06:05 +0000 Received: from localhost ([127.0.0.1]:56760 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1UmS1F-0004Qp-KD for submit@debbugs.gnu.org; Tue, 11 Jun 2013 13:06:05 -0400 Received: from fencepost.gnu.org ([208.118.235.10]:35485 ident=Debian-exim) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1UmS1E-0004Qd-4C for control@debbugs.gnu.org; Tue, 11 Jun 2013 13:06:04 -0400 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1UmS0x-0005pN-Ri for control@debbugs.gnu.org; Tue, 11 Jun 2013 13:05:47 -0400 Date: Tue, 11 Jun 2013 13:05:47 -0400 Message-Id: Subject: control message for bug 14589 To: X-Mailer: mail (GNU Mailutils 2.1) From: Glenn Morris X-Spam-Score: -5.2 (-----) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.2 (-----) close 14589