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

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

bug#21922: Fwd: bug#21922: Fwd: bug#21922: Fwd: Patch for fixing "straig


From: Luis Henriquez-Perez
Subject: bug#21922: Fwd: bug#21922: Fwd: bug#21922: Fwd: Patch for fixing "straigh-quote" case
Date: Tue, 22 Oct 2019 21:28:04 -0400



---------- Forwarded message ---------
From: Luis Henriquez-Perez <luishenriquezperez@gmail.com>
Date: Tue, Oct 22, 2019 at 9:27 PM
Subject: Re: bug#21922: Fwd: bug#21922: Fwd: Patch for fixing "straigh-quote" case
To: Noam Postavsky <npostavs@gmail.com>


>> No, this time I ... managed to write what I meant.

Oh ok. I learned something new. I had thought that the whitespace syntax needed
two pairs of square brackets surrounding it. So I didn't think "[[:space:]\n]"
was legal. I thought it had to be written as "[[[:space:]]\n]". After testing it
I see that you're right. What you have is what (rx (any space "\n")) returns.

>>  It would be more convenient to have your change as a patch

>> ... adding a test ... would be good as well.

Ok I'll set about doing these things and reply to this thread again when I'm done.

On Tue, Oct 22, 2019 at 8:55 PM Noam Postavsky <npostavs@gmail.com> wrote:
Luis Henriquez-Perez <luishenriquezperez@gmail.com> writes:

>>> I meant to say (looking-at-p "[[:space:]\n]*quote\\_>")
>
> I changed "[[:space:]\n]" -> "[[:space:]]\n" because I think that's what
> you meant.

No, this time I actually managed to write what I meant :)

"[[:space:]\n]*" will match any number of whitespace-syntax or newline
characters, whereas "[[:space:]]\n*" will match exactly one
whitespace-syntax character, followed by any number of newlines.

> I'm new to contributing patches. Is there anything else I need to do
> to get this into emacs?

It would be more convenient to have your change as a patch, rather than
just the resulting code.  If you have the Emacs git repo, committing
locally and attaching the result of 'git format-patch' as described in
CONTRIBUTE would be the best way.  Otherwise, even just the output of

    diff -u lisp/emacs-lisp/lisp-mode.el.original lisp/emacs-lisp/lisp-mode.el

would be helpful.

Oh, and adding a test to test/lisp/emacs-lisp/lisp-mode-tests.el would
be good as well (e.g., to catch mistakes like using "[[:space:]]\n*"
instead of "[[:space:]\n]*").

reply via email to

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