GNU bug report logs - #28448
26.0.50; js-mode missing some functions for imenu

Previous Next

Package: emacs;

Reported by: Tom Tromey <tom <at> tromey.com>

Date: Wed, 13 Sep 2017 17:56:02 UTC

Severity: minor

Merged with 41676

Found in versions 26.0.50, 27.0.91

Full log


View this message in rfc822 format

From: Dmitry Gutov <dgutov <at> yandex.ru>
To: Lars Ingebrigtsen <larsi <at> gnus.org>, Tom Tromey <tom <at> tromey.com>
Cc: 28448 <at> debbugs.gnu.org
Subject: bug#28448: 26.0.50; js-mode missing some functions for imenu
Date: Fri, 5 Feb 2021 15:25:16 +0200
On 05.02.2021 13:19, Lars Ingebrigtsen wrote:
> Tom Tromey <tom <at> 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
> 
> 
> 
> 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?

Also see bug#41676 which mentions more modern constructs which js-mode's 
imenu doesn't handle.




This bug report was last modified 3 years and 44 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.