all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Dmitry Gutov <dgutov@yandex.ru>
To: Adam Niederer <adam.niederer@gmail.com>, emacs-devel@gnu.org
Subject: Re: [PATCH] Update js-mode function heading regexes
Date: Fri, 29 Sep 2017 00:02:52 +0300	[thread overview]
Message-ID: <a387cd18-3113-d8bf-600c-29035c9b74e7@yandex.ru> (raw)
In-Reply-To: <365dbefc-1dee-c7c6-e9d5-c5a3b6fd0a9d@gmail.com>

Hi Adam,

Sorry for the late reply.

On 6/19/17 10:04 AM, Adam Niederer wrote:

> The file I included was primarily for visual evaluation of the changes.
> Adding some automated tests is a good idea, though, so I've included an
> updated patchset below. This also makes js--function-heading-2-re work
> on async functions.

Sometimes it's easier to evaluate the improvement just by looking at the 
tests, though it depends on how they are written, of course.

To comment on the patch and your original post:

- The change to heading-3-re is not mentioned, but it's fairly obvious.

- I don't quite understand the description of the change in 
heading-2-re. Why not at least require a colon?

>> Not much. Patch submissions via the bug tracker have higher odds of
>> not being forgotten is they're not applied right away, though.
>>
>> Thanks for the patch.
> 
> Would reposting these changes to bug-gnu-emacs be a good idea?

By now it's looking even better than it did back then. As you can see, 
it's been lost in the mailing list.

And I'd like for someone else to look at the patch, because it touches 
the area of js-mode than I've never had to deal with.

> +(ert-deftest js-mode-highlight-function-names ()
> +  "Ensure js--function-heading-1-re and js--function-heading-2-re match all
> +possible function declarations and highlight the function names
> accordingly."

LGTM.

> +(ert-deftest js-mode-accept-function-bindings ()
> +  "Ensure js--function-heading-3-re matches all function declarations
> of the
> +form (var|let|const) foo = (async)? function."

Regarding this test, can we check something higher level than whether 
js--function-heading-3-re matches? It's an implementation detail, after all.



      reply	other threads:[~2017-09-28 21:02 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-17  7:30 [PATCH] Update js-mode function heading regexes Adam Niederer
2017-06-18 23:59 ` Dmitry Gutov
2017-06-19  7:04   ` Adam Niederer
2017-09-28 21:02     ` Dmitry Gutov [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a387cd18-3113-d8bf-600c-29035c9b74e7@yandex.ru \
    --to=dgutov@yandex.ru \
    --cc=adam.niederer@gmail.com \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.