GNU bug report logs - #14589
24.3; lisp-mode and parenthesis in multi-line string

Previous Next

Package: emacs;

Reported by: andy peterson <andrewp <at> terra.com.br>

Date: Tue, 11 Jun 2013 15:49:01 UTC

Severity: minor

Tags: notabug

Found in version 24.3

Done: Glenn Morris <rgm <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #8 received at 14589 <at> debbugs.gnu.org (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: andy peterson <andrewp <at> terra.com.br>
Cc: 14589 <at> debbugs.gnu.org
Subject: Re: bug#14589: 24.3; lisp-mode and parenthesis in multi-line string
Date: Tue, 11 Jun 2013 12:02:46 -0400
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.




This bug report was last modified 12 years and 41 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.