[Top][All Lists]

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

Re: Backslash-escaped brackets in string literals

From: Stefan Monnier
Subject: Re: Backslash-escaped brackets in string literals
Date: Fri, 24 Jan 2020 12:36:52 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

> First of all, is this still true?

Yes and no.  We have started to remove dependence on this, but there's
still some ways to go.  Eli mentioned `C-x 4 a` but there are others.

> I rarely bother escaping brackets in doc strings and it doesn't seem
> to cause any editing confusion. For example, beginning-of-defun
> doesn't seem to be fooled by a '(' in column 1 inside a doc string.
> (I do escape the (fn ...) annotation, probably out of superstition.)

Indeed, it "should" work fine.  You can report any misbehavior as a bug.

> Moreover, these backslashes appear a bit everywhere (not just doc
> strings), not only at bol, and not only before an opening bracket.

Not my fault ;-)

But yes, some authors probably decided it's easier to put them
"everywhere" than to understand exactly when it's needed (and to fix
the cases where refilling moves a `(` to/from BOL).

> A list of all red backslashes attached.

Without seeing the actual occurrences, it's hard to decide what to do
with them.  Those that occur within "normal strings" would benefit from
being fixed (i.e. removing the backslash).  Those that apply to
something else than an open paren probably should be fixed as well.


reply via email to

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