* bug#14589: 24.3; lisp-mode and parenthesis in multi-line string
@ 2013-06-11 13:52 andy peterson
2013-06-11 16:02 ` Glenn Morris
0 siblings, 1 reply; 2+ messages in thread
From: andy peterson @ 2013-06-11 13:52 UTC (permalink / raw)
To: 14589
[-- Attachment #1: Type: text/plain, Size: 568 bytes --]
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
[-- Attachment #2: Type: text/html, Size: 1036 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
* bug#14589: 24.3; lisp-mode and parenthesis in multi-line string
2013-06-11 13:52 bug#14589: 24.3; lisp-mode and parenthesis in multi-line string andy peterson
@ 2013-06-11 16:02 ` Glenn Morris
0 siblings, 0 replies; 2+ messages in thread
From: Glenn Morris @ 2013-06-11 16:02 UTC (permalink / raw)
To: andy peterson; +Cc: 14589
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.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-06-11 16:02 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-06-11 13:52 bug#14589: 24.3; lisp-mode and parenthesis in multi-line string andy peterson
2013-06-11 16:02 ` Glenn Morris
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).