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

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

bug#28448: 26.0.50; js-mode missing some functions for imenu


From: Lars Ingebrigtsen
Subject: bug#28448: 26.0.50; js-mode missing some functions for imenu
Date: Fri, 05 Feb 2021 12:19:26 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

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

PNG image

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

reply via email to

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