From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.bugs Subject: bug#28448: 26.0.50; js-mode missing some functions for imenu Date: Fri, 5 Feb 2021 15:25:16 +0200 Message-ID: References: <87k21232nd.fsf@pokyo> <87zh0iiwxt.fsf@gnus.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="33468"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 Cc: 28448@debbugs.gnu.org To: Lars Ingebrigtsen , Tom Tromey Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Feb 05 14:26:18 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1l817p-0008aW-QQ for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 05 Feb 2021 14:26:17 +0100 Original-Received: from localhost ([::1]:46154 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l817o-00019C-T7 for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 05 Feb 2021 08:26:16 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:55190) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l817a-00017N-3f for bug-gnu-emacs@gnu.org; Fri, 05 Feb 2021 08:26:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:59850) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l817Z-0001F4-Sw for bug-gnu-emacs@gnu.org; Fri, 05 Feb 2021 08:26:01 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1l817Z-0001fA-QI for bug-gnu-emacs@gnu.org; Fri, 05 Feb 2021 08:26:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 05 Feb 2021 13:26:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 28448 X-GNU-PR-Package: emacs Original-Received: via spool by 28448-submit@debbugs.gnu.org id=B28448.16125315286352 (code B ref 28448); Fri, 05 Feb 2021 13:26:01 +0000 Original-Received: (at 28448) by debbugs.gnu.org; 5 Feb 2021 13:25:28 +0000 Original-Received: from localhost ([127.0.0.1]:43163 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l8172-0001eO-3C for submit@debbugs.gnu.org; Fri, 05 Feb 2021 08:25:28 -0500 Original-Received: from mail-wr1-f52.google.com ([209.85.221.52]:46735) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l816z-0001e6-1C for 28448@debbugs.gnu.org; Fri, 05 Feb 2021 08:25:26 -0500 Original-Received: by mail-wr1-f52.google.com with SMTP id q7so7614181wre.13 for <28448@debbugs.gnu.org>; Fri, 05 Feb 2021 05:25:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=M9s794G/lTVTQXONq9cx6Jdtl9frgoPVXqidXium6I4=; b=LqUhFzTpUFFf46lnP/MQZ5IB1oXopn5907Xi8CUTun0XdA6Mca2R51kZywleWvu0C+ aXQx3DnpbzvnIIZauoV31rQ3ObmZ8azk303cvl1pe5P3ILLcc7405gG6I+P3lIpYILFs w9Bz0IrhObKMt2+qLqCXX+PMKBnI7DzVZI/7Sjp6/Q6dmieY6GlUIic4X71SUhwavdgq xPiCyGrcq0N67lc5Uaezko7gK6byPgg12u6wpiRI2MnSDkfb5ZEI3CuGoRf8eC+MBWfP HM/w3WOAsNX/8sm2hvio4CLlTGHvYtmt+D1NSrAaVqv4oyuzLzdu7rVhQuUj5RO2qgTq QUaQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=M9s794G/lTVTQXONq9cx6Jdtl9frgoPVXqidXium6I4=; b=gjQjB6p/ot89kgJaKJGRJd1Sr5JLHiBrV9iX98/+fPfpZl3ChKCbbqGdTmDj/AO+yK 70WmITZkppz4Wrs2pQ5M8JReYPTDS3DbwZ+Tk3NlUyPg4FfKQsgtoNopTaS4xmz6JgKO hS0dMDYLD/mWZv8Hqerv276+knOYiiWifKTrlnGVYiLSsvb5STnaJkA0OrcIHvEkCcyV BaiQwRA6XdP5nD667cVnIIFlkBESLYT5BdptKDOBELRH6Spvsn3Mw53HJ64tu466K2BU 6gXSOvxJGzZ8S/mJETo/B7Gq3qd1aMQYPtWQJsc93Bj9AlEygk+yx/+A6SBPWhbe9Qg4 cTqA== X-Gm-Message-State: AOAM5316ioNtMB3j/ntAMwiCziy7/nfdVrmsqg7GHeDTLW2XBpy4FTAh PzZ1+zme1P1Hrwj1quq+ZauZCaXiDJ8= X-Google-Smtp-Source: ABdhPJyzQh+h+lFmXgq1rjyPBB4YRKlp4867b8DgkDrhQZeidIuLXcHmQNXoi1jAYpWu66RrEap7aw== X-Received: by 2002:a5d:6847:: with SMTP id o7mr5062633wrw.216.1612531519360; Fri, 05 Feb 2021 05:25:19 -0800 (PST) Original-Received: from [192.168.0.6] ([46.251.119.176]) by smtp.googlemail.com with ESMTPSA id n5sm8394069wmq.7.2021.02.05.05.25.18 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 05 Feb 2021 05:25:18 -0800 (PST) In-Reply-To: <87zh0iiwxt.fsf@gnus.org> Content-Language: en-US X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:199375 Archived-At: On 05.02.2021 13:19, Lars Ingebrigtsen wrote: > Tom Tromey 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.