bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#14589: 24.3; lisp-mode and parenthesis in multi-line string


From: Glenn Morris
Subject: bug#14589: 24.3; lisp-mode and parenthesis in multi-line string
Date: Tue, 11 Jun 2013 12:02:46 -0400
User-agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/)

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.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]