all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Lars Ingebrigtsen <larsi@gnus.org>
To: Tom Tromey <tom@tromey.com>
Cc: 28448@debbugs.gnu.org
Subject: bug#28448: 26.0.50; js-mode missing some functions for imenu
Date: Fri, 05 Feb 2021 12:19:26 +0100	[thread overview]
Message-ID: <87zh0iiwxt.fsf@gnus.org> (raw)
In-Reply-To: <87k21232nd.fsf@pokyo> (Tom Tromey's message of "Wed, 13 Sep 2017 11:54:30 -0600")

[-- Attachment #1: Type: text/plain, Size: 776 bytes --]

Tom Tromey <tom@tromey.com> writes:

> Consider this pared-down but relatively normal js file:
>
> ================================================================
> function StyleSheetEditor(styleSheet, win, file, isNew, walker, highlighter) {
> }
> StyleSheetEditor.prototype = {
>     get unsaved() {
>     },
>     updateLinkedStyleSheet: function () {
>     },
>     checkLinkedFileForChanges: function () {
> 	this.unsaved().updateLinkedStyleSheet();
>     },
> }
> ================================================================
>
> Here it would be great to have imenu entries for "unsaved" and
> "updateLinkedStyleSheet".
>
> Currently js-mode doesn't find these.

I tried this in Emacs 26.1 (and on the trunk), and

M-x imenu RET StyleSheetEditor RET TAB

gave me


[-- Attachment #2: Type: image/png, Size: 52464 bytes --]

[-- Attachment #3: Type: text/plain, Size: 264 bytes --]


So the only thing it didn't find was the "unsaved"?  So I guess the
problem here is that js--imenu-create-index doesn't know the "get" thing
in JS prototypes?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no

  parent reply	other threads:[~2021-02-05 11:19 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-13 17:54 bug#28448: 26.0.50; js-mode missing some functions for imenu Tom Tromey
2017-09-15 15:43 ` Hariharan
2021-02-05 11:19 ` Lars Ingebrigtsen [this message]
2021-02-05 13:25   ` Dmitry Gutov

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=87zh0iiwxt.fsf@gnus.org \
    --to=larsi@gnus.org \
    --cc=28448@debbugs.gnu.org \
    --cc=tom@tromey.com \
    /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.