[Top][All Lists]

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

Re: CC Mode and electric-pair "problem".

From: João Távora
Subject: Re: CC Mode and electric-pair "problem".
Date: Tue, 26 Jun 2018 20:45:44 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

> Hello, João.

Hi Alan,

Alan Mackenzie <address@hidden> writes:

>> [ .... ]
>> Maybe we're looking at this the wrong way.
>> How about this idea: we add a new syntax flag to Emacs, ", which
>> terminates any open string, the same way the syntax > terminates any
>> open comment.  We could then set this syntax flag on newline.
> This isn't a sensible idea. because it wouldn't solve any of the
> problems we have with the string-fence syntax.

You realize you're replying to your own suggestion, right? (just

> This would have the advantage of making fontification easy, whilst still
> allowing syntactic operations within an invalid string.  For example, in
>     char *foo = "(
>     )"
> , the "s would have "one-line string quote" syntax and be fontified with
> warning face, but a C-M-n from the ( would still move point to after the
> ), and all the electric-pair-mode stuff would still work.

Ignoring any complications or complexity that would arise from it, that
sounds great (though more important than supporting e-p-m is having
C-M-u work from inside the string, which I suppose is included).


reply via email to

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