X-Loop: help-debbugs@HIDDEN Subject: bug#8724: 23.2; js-mode imenu should be more thorough Resent-From: dino chiesa <dpchiesa@HIDDEN> Original-Sender: debbugs-submit-bounces <at> debbugs.gnu.org Resent-To: owner <at> debbugs.gnu.org Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Tue, 24 May 2011 13:16:02 +0000 Resent-Message-ID: <handler.8724.B.130624295011453 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: report 8724 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 8724 <at> debbugs.gnu.org X-Debbugs-Original-To: <bug-gnu-emacs@HIDDEN> Received: via spool by submit <at> debbugs.gnu.org id=B.130624295011453 (code B ref -1); Tue, 24 May 2011 13:16:02 +0000 Received: (at submit) by debbugs.gnu.org; 24 May 2011 13:15:50 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1QOrSf-0002yf-7G for submit <at> debbugs.gnu.org; Tue, 24 May 2011 09:15:50 -0400 Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from <dpchiesa@HIDDEN>) id 1QOrSb-0002yT-Vf for submit <at> debbugs.gnu.org; Tue, 24 May 2011 09:15:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <dpchiesa@HIDDEN>) id 1QOrSV-000410-CO for submit <at> debbugs.gnu.org; Tue, 24 May 2011 09:15:40 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.6 required=5.0 tests=BAYES_00,FREEMAIL_FROM, HTML_MESSAGE, RCVD_IN_DNSWL_NONE, RECEIVED_FROM_WINDOWS_HOST, RFC_ABUSE_POST, T_RP_MATCHES_RCVD autolearn=no version=3.3.1 Received: from lists.gnu.org ([140.186.70.17]:40510) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <dpchiesa@HIDDEN>) id 1QOrSV-00040w-AL for submit <at> debbugs.gnu.org; Tue, 24 May 2011 09:15:39 -0400 Received: from eggs.gnu.org ([140.186.70.92]:47549) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <dpchiesa@HIDDEN>) id 1QOrST-0006gA-Ke for bug-gnu-emacs@HIDDEN; Tue, 24 May 2011 09:15:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <dpchiesa@HIDDEN>) id 1QOrSS-00040b-4G for bug-gnu-emacs@HIDDEN; Tue, 24 May 2011 09:15:37 -0400 Received: from blu0-omc1-s14.blu0.hotmail.com ([65.55.116.25]:52904) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <dpchiesa@HIDDEN>) id 1QOrSR-00040X-W6 for bug-gnu-emacs@HIDDEN; Tue, 24 May 2011 09:15:36 -0400 Received: from BLU159-W1 ([65.55.116.9]) by blu0-omc1-s14.blu0.hotmail.com with Microsoft SMTPSVC(6.0.3790.4675); Tue, 24 May 2011 05:51:36 -0700 Message-ID: <BLU159-w1BD508A3BC8FDB4EA3337CE750@HIDDEN> Content-Type: multipart/alternative; boundary="_a96799d3-bcd9-40d4-83aa-39cac8955e13_" X-Originating-IP: [71.60.182.236] From: dino chiesa <dpchiesa@HIDDEN> Date: Tue, 24 May 2011 05:51:36 -0700 Importance: Normal MIME-Version: 1.0 X-OriginalArrivalTime: 24 May 2011 12:51:36.0583 (UTC) FILETIME=[5130F170:01CC1A11] X-detected-operating-system: by eggs.gnu.org: Windows 2000 SP4, XP SP1+ X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 140.186.70.17 X-Spam-Score: -6.0 (------) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <http://debbugs.gnu.org/pipermail/debbugs-submit> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Sender: debbugs-submit-bounces <at> debbugs.gnu.org Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org X-Spam-Score: -6.0 (------) --_a96799d3-bcd9-40d4-83aa-39cac8955e13_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Module /emacs/lisp/progmodes/js.el =20 In js-mode=2C editing a short javascript file=2C the imenu indexing works nicely but the actual menu is incomplete=2C truncated. The defun js--pitems-to-imenu seems to make an insufficient effort=2C when nested function definitions are used in the source.=20 =20 For example=2C supposing this js source:=20 =20 jQuery(document).ready(function () { var $th =3D jQuery('thead > tr > th')=3B $th.each(function(column=2C elt) { jQuery(this).addClass('sortable').click(function() { ... })=3B })=3B })=3B =20 (this is fairly typical with javascript) =20 In this case js-mode will index all of the anonymous functions=2C but will= =20 produce an imenu that contains only the outer anonymous function. This is=20 done in js--pitems-to-imenu. Also=2C in the same defun=2C the imenu entry u= ses "Unknown" as the name of the anonymous function. =20 I propose 2 things:=20 - replace the name "unknown" with "Anonymous" - recurse into js--pitems-to-imenu for functions that define=20 child functions.=20 The proposed new code for the defun is:=20 =20 (defun js--pitems-to-imenu (pitems unknown-ctr) "Convert list of pitems PITEMS to imenu format" (let (imenu-items pitem pitem-type pitem-name subitems) (while (setq pitem (pop pitems)) (setq pitem-type (js--pitem-type pitem)) (setq pitem-name (js--pitem-strname pitem)) (when (eq pitem-name t) (setq pitem-name (format "Anonymous %s" (incf (car unknown-ctr))))) (cond ((memq pitem-type '(function macro)) (assert (integerp (js--pitem-h-begin pitem))) =3B=3B DPC check for children (nested fnc defns) (cond ((js--pitem-children pitem) (setq subitems (js--pitems-to-imenu (js--pitem-children pitem) unknown-ctr)) (cond (subitems =3B=3B DPC index "top" and "bottom" of the enclosure (push (cons "(top)" (js--maybe-make-marker (js--pitem-h-begin pitem))) subitems) (let ((b-end (js--pitem-b-end pitem))) (if b-end (setq subitems (append subitems (list (cons "(bottom)" (js--maybe-make-marker b-e= nd))) subitems)))) (push (cons pitem-name subitems) imenu-items)) (t (push (cons pitem-name (js--maybe-make-marker (js--pitem-h-begin pitem))) imenu-items)))) (t (push (cons pitem-name (js--maybe-make-marker (js--pitem-h-begin pitem))) imenu-items)))) ((consp pitem-type) =3B class definition (setq subitems (js--pitems-to-imenu (js--pitem-children pitem) unknown-ctr)) (cond (subitems (push (cons pitem-name subitems) imenu-items)) ((js--pitem-h-begin pitem) (assert (integerp (js--pitem-h-begin pitem))) (setq subitems (list (cons "[empty]" (js--maybe-make-marker (js--pitem-h-begin pitem))))) (push (cons pitem-name subitems) imenu-items)))) (t (error "Unknown item type: %S" pitem-type)))) imenu-items)) =20 =20 In GNU Emacs 23.2.1 (i386-mingw-nt6.1.7601) of 2010-05-08 on G41R2F1 Windowing system distributor `Microsoft Corp.'=2C version 6.1.7601 configured using `configure --with-gcc (3.4) --no-opt --cflags -Ic:/xpm/inc= lude' Important settings: value of $LC_ALL: nil value of $LC_COLLATE: nil value of $LC_CTYPE: nil value of $LC_MESSAGES: nil value of $LC_MONETARY: nil value of $LC_NUMERIC: nil value of $LC_TIME: nil value of $LANG: ENU value of $XMODIFIERS: nil locale-coding-system: cp1252 default enable-multibyte-characters: t Major mode: Emacs-Lisp Minor modes in effect: auto-revert-mode: t yas/minor-mode: t global-hl-line-mode: t hl-line-mode: t global-auto-complete-mode: t auto-complete-mode: t tooltip-mode: t mouse-wheel-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t Recent messages: Mark saved where search started Mark set No closing parenthesis found Mark set Matches '(... [-73-] Matches (eval-after-load "js" [-74] Mark set [2 times] Saving file c:/Users/Dino/elisp/emacs.el... Wrote c:/Users/Dino/elisp/emacs.el Mark set Load-path shadows: /users/dino/elisp/linum hides c:/emacs/lisp/linum /users/dino/elisp/css-mode hides c:/emacs/lisp/textmodes/css-mode Features: (shadow sort mail-extr message ecomplete rfc822 mml mml-sec password-cache mm-decode mm-bodies mm-encode mailcap mail-parse rfc2231 rfc2047 rfc2045 qp ietf-drums mailabbrev nnheader gnus-util netrc time-date mm-util mail-prsvr gmm-utils wid-edit mailheader canlock sha1 hex-util hashcash mail-utils emacsbug help-mode view js find-func dired-aux flymake-for-jslint-for-wsh flymake-cursor flymake autopair espresso bytecomp byte-compile ido json thingatpt etags imenu newcomment cc-mode cc-fonts cc-menus cc-cmds multi-isearch grep compile comint ring time-stamp sgml-mode autorevert server cperl-mode paren mic-paren hideshow easymenu cc-styles cc-align cc-engine cc-vars cc-defs dired regexp-opt defaultcontent yasnippet-bundle dropdown-list yasnippet easy-mmode cl cl-19 tfs skeleton httpget hl-line advice help-fns advice-preload auto-complete-config auto-complete edmacro kmacro popup tooltip ediff-hook vc-hooks lisp-float-type mwheel dos-w32 disp-table ls-lisp w32-win w32-vars tool-bar dnd fontset image fringe lisp-mode register page menu-bar rfn-eshadow timer select scroll-bar mldrag mouse jit-lock font-lock syntax facemenu font-core frame cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev loaddefs button minibuffer faces cus-face files text-properties overlay md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote make-network-process multi-tty emacs) = --_a96799d3-bcd9-40d4-83aa-39cac8955e13_ Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable <html> <head> <style><!-- .hmmessage P { margin:0px=3B padding:0px } body.hmmessage { font-size: 10pt=3B font-family:Tahoma } --></style> </head> <body class=3D'hmmessage'> Module /emacs/lisp/progmodes/js.el<BR>  =3B<BR> In js-mode=2C editing a short javascript file=2C the imenu indexing works<B= R>nicely but the actual menu is incomplete=2C truncated. The defun<BR>js--p= items-to-imenu seems to make an insufficient effort=2C when<BR>nested funct= ion definitions =3Bare used in the source. <BR>  =3B<BR> For example=2C supposing this js source: <BR>  =3B<BR>  =3B jQuery(document).ready(function () {<BR>  =3B =3B =3B =3B =3B var $th =3D jQuery('thead >=3B t= r >=3B th')=3B<BR>  =3B =3B =3B =3B =3B $th.each(function(column=2C elt) {= <BR>  =3B =3B =3B =3B =3B =3B =3B =3B =3B jQ= uery(this).addClass('sortable').click(function() {<BR> =3B =3B = =3B =3B =3B =3B =3B =3B =3B =3B =3B =3B= ...<BR> =3B =3B =3B =3B =3B =3B =3B =3B&nb= sp=3B })=3B<BR> =3B =3B =3B =3B =3B })=3B<BR> =3B }= )=3B<BR>  =3B<BR> (this is fairly typical with javascript)<BR>  =3B<BR> In this case =3Bjs-mode will index all of the anonymous functions=2C bu= t will <BR>produce an imenu that contains only the outer anonymous function= . This is <BR>done in js--pitems-to-imenu. Also=2C in the same defun=2C the= imenu entry uses<BR>"Unknown" as the name of the anonymous function.<BR>  =3B<BR> I propose 2 things: <BR>  =3B - replace the name "unknown" with "Anonymous"<BR>  =3B - recurse into js--pitems-to-imenu for functions that define <BR>&= nbsp=3B =3B =3B child functions. <BR> <BR>The proposed new code for the defun is: <BR>  =3B<BR>  =3B =3B =3B =3B (defun js--pitems-to-imenu (pitems unknown= -ctr)<BR> =3B =3B =3B =3B =3B =3B "Convert list of = pitems PITEMS to imenu format"<BR>  =3B =3B =3B =3B =3B =3B (let (imenu-items pitem pi= tem-type pitem-name subitems)<BR>  =3B =3B =3B =3B =3B =3B =3B =3B (while (se= tq pitem (pop pitems))<BR> =3B =3B =3B =3B =3B =3B&= nbsp=3B =3B =3B =3B (setq pitem-type (js--pitem-type pitem))<BR= > =3B =3B =3B =3B =3B =3B =3B =3B =3B&n= bsp=3B (setq pitem-name (js--pitem-strname pitem))<BR> =3B =3B = =3B =3B =3B =3B =3B =3B =3B =3B (when (eq pitem= -name t)<BR> =3B =3B =3B =3B =3B =3B =3B = =3B =3B =3B =3B =3B (setq pitem-name (format "Anonymous %s"= <BR> =3B =3B =3B =3B =3B =3B =3B =3B = =3B =3B =3B =3B =3B =3B =3B =3B =3B =3B=  =3B =3B =3B =3B =3B =3B =3B =3B =3B&nb= sp=3B =3B =3B =3B =3B =3B =3B =3B =3B = =3B (incf (car unknown-ctr)))))<BR>  =3B =3B =3B =3B =3B =3B =3B =3B =3B&nb= sp=3B (cond<BR> =3B =3B =3B =3B =3B =3B =3B&nbs= p=3B =3B =3B =3B ((memq pitem-type '(function macro))<BR> = =3B =3B =3B =3B =3B =3B =3B =3B =3B =3B=  =3B =3B (assert (integerp (js--pitem-h-begin pitem)))<BR>  =3B =3B =3B =3B =3B =3B =3B =3B =3B&nb= sp=3B =3B =3B =3B=3B DPC check for children (nested fnc defns)<BR>&= nbsp=3B =3B =3B =3B =3B =3B =3B =3B =3B&nbs= p=3B =3B =3B (cond<BR> =3B =3B =3B =3B =3B = =3B =3B =3B =3B =3B =3B =3B =3B ((js--pitem-chi= ldren pitem)<BR> =3B =3B =3B =3B =3B =3B =3B&nb= sp=3B =3B =3B =3B =3B =3B =3B (setq subitems (js--p= items-to-imenu<BR> =3B =3B =3B =3B =3B =3B =3B&= nbsp=3B =3B =3B =3B =3B =3B =3B =3B =3B&nbs= p=3B =3B =3B =3B =3B =3B =3B =3B =3B = =3B =3B =3B =3B =3B (js--pitem-children pitem)<BR> =3B&= nbsp=3B =3B =3B =3B =3B =3B =3B =3B =3B&nbs= p=3B =3B =3B =3B =3B =3B =3B =3B =3B = =3B =3B =3B =3B =3B =3B =3B =3B =3B =3B=  =3B unknown-ctr))<BR> =3B =3B =3B =3B =3B =3B&= nbsp=3B =3B =3B =3B =3B =3B =3B =3B (cond<BR>&n= bsp=3B =3B =3B =3B =3B =3B =3B =3B =3B = =3B =3B =3B =3B =3B =3B (subitems<BR> =3B =3B&n= bsp=3B =3B =3B =3B =3B =3B =3B =3B =3B = =3B =3B =3B =3B =3B =3B=3B DPC index "top" and "bottom" of = the enclosure<BR> =3B =3B =3B =3B =3B =3B =3B&n= bsp=3B =3B =3B =3B =3B =3B =3B =3B =3B (pus= h (cons "(top)"<BR> =3B =3B =3B =3B =3B =3B =3B=  =3B =3B =3B =3B =3B =3B =3B =3B =3B&nb= sp=3B =3B =3B =3B =3B =3B =3B =3B =3B = =3B =3B =3B (js--maybe-make-marker<BR> =3B =3B =3B = =3B =3B =3B =3B =3B =3B =3B =3B =3B =3B=  =3B =3B =3B =3B =3B =3B =3B =3B =3B&nb= sp=3B =3B =3B =3B =3B =3B =3B (js--pitem-h-begin pi= tem)))<BR> =3B =3B =3B =3B =3B =3B =3B =3B&= nbsp=3B =3B =3B =3B =3B =3B =3B =3B =3B&nbs= p=3B =3B =3B =3B =3B subitems)<BR>  =3B =3B =3B =3B =3B =3B =3B =3B =3B&nb= sp=3B =3B =3B =3B =3B =3B =3B (let ((b-end (js--pit= em-b-end pitem)))<BR> =3B =3B =3B =3B =3B =3B = =3B =3B =3B =3B =3B =3B =3B =3B =3B =3B=  =3B =3B (if b-end<BR> =3B =3B =3B =3B =3B = =3B =3B =3B =3B =3B =3B =3B =3B =3B =3B=  =3B =3B =3B =3B =3B =3B =3B (setq subitems<BR>=  =3B =3B =3B =3B =3B =3B =3B =3B =3B&nb= sp=3B =3B =3B =3B =3B =3B =3B =3B =3B = =3B =3B =3B =3B =3B =3B =3B =3B =3B =3B= (append subitems<BR> =3B =3B =3B =3B =3B =3B = =3B =3B =3B =3B =3B =3B =3B =3B =3B =3B=  =3B =3B =3B =3B =3B =3B =3B =3B =3B&nb= sp=3B =3B =3B =3B =3B =3B =3B =3B =3B = =3B =3B (list (cons "(bottom)"<BR> =3B =3B =3B =3B = =3B =3B =3B =3B =3B =3B =3B =3B =3B =3B=  =3B =3B =3B =3B =3B =3B =3B =3B =3B&nb= sp=3B =3B =3B =3B =3B =3B =3B =3B =3B = =3B =3B =3B =3B =3B =3B =3B =3B =3B =3B=  =3B =3B =3B =3B =3B =3B (js--maybe-make-marker b-e= nd)))<BR> =3B =3B =3B =3B =3B =3B =3B =3B&n= bsp=3B =3B =3B =3B =3B =3B =3B =3B =3B = =3B =3B =3B =3B =3B =3B =3B =3B =3B =3B=  =3B =3B =3B =3B =3B =3B =3B =3B =3B su= bitems))))<BR>  =3B =3B =3B =3B =3B =3B =3B =3B =3B&nb= sp=3B =3B =3B =3B =3B =3B =3B (push (cons pitem-nam= e subitems)<BR> =3B =3B =3B =3B =3B =3B =3B&nbs= p=3B =3B =3B =3B =3B =3B =3B =3B =3B = =3B =3B =3B =3B =3B =3B imenu-items))<BR>  =3B =3B =3B =3B =3B =3B =3B =3B =3B&nb= sp=3B =3B =3B =3B =3B =3B (t<BR> =3B =3B = =3B =3B =3B =3B =3B =3B =3B =3B =3B =3B=  =3B =3B =3B =3B (push (cons pitem-name<BR> =3B =3B=  =3B =3B =3B =3B =3B =3B =3B =3B =3B&nb= sp=3B =3B =3B =3B =3B =3B =3B =3B =3B = =3B =3B =3B =3B =3B =3B =3B =3B (js--maybe-make= -marker<BR> =3B =3B =3B =3B =3B =3B =3B =3B=  =3B =3B =3B =3B =3B =3B =3B =3B =3B&nb= sp=3B =3B =3B =3B =3B =3B =3B =3B =3B = =3B =3B =3B (js--pitem-h-begin pitem)))<BR> =3B =3B =3B=  =3B =3B =3B =3B =3B =3B =3B =3B =3B&nb= sp=3B =3B =3B =3B =3B =3B =3B =3B =3B = =3B imenu-items))))<BR>  =3B =3B =3B =3B =3B =3B =3B =3B =3B&nb= sp=3B =3B =3B =3B (t<BR> =3B =3B =3B =3B = =3B =3B =3B =3B =3B =3B =3B =3B =3B =3B= (push (cons pitem-name<BR> =3B =3B =3B =3B =3B =3B=  =3B =3B =3B =3B =3B =3B =3B =3B =3B&nb= sp=3B =3B =3B =3B =3B =3B =3B =3B =3B = =3B =3B (js--maybe-make-marker<BR> =3B =3B =3B =3B = =3B =3B =3B =3B =3B =3B =3B =3B =3B =3B=  =3B =3B =3B =3B =3B =3B =3B =3B =3B&nb= sp=3B =3B =3B =3B (js--pitem-h-begin pitem)))<BR> =3B = =3B =3B =3B =3B =3B =3B =3B =3B =3B =3B=  =3B =3B =3B =3B =3B =3B =3B =3B =3B im= enu-items))))<BR>  =3B =3B =3B =3B =3B =3B =3B =3B =3B&nb= sp=3B =3B ((consp pitem-type) =3B class definition<BR> =3B =3B&= nbsp=3B =3B =3B =3B =3B =3B =3B =3B =3B&nbs= p=3B (setq subitems (js--pitems-to-imenu<BR> =3B =3B =3B = =3B =3B =3B =3B =3B =3B =3B =3B =3B =3B=  =3B =3B =3B =3B =3B =3B =3B =3B =3B&nb= sp=3B =3B =3B =3B =3B =3B (js--pitem-children pitem)<BR= > =3B =3B =3B =3B =3B =3B =3B =3B =3B&n= bsp=3B =3B =3B =3B =3B =3B =3B =3B =3B = =3B =3B =3B =3B =3B =3B =3B =3B =3B =3B= unknown-ctr))<BR> =3B =3B =3B =3B =3B =3B =3B&= nbsp=3B =3B =3B =3B =3B (cond (subitems<BR> =3B =3B=  =3B =3B =3B =3B =3B =3B =3B =3B =3B&nb= sp=3B =3B =3B =3B =3B =3B =3B =3B (push (cons p= item-name subitems)<BR> =3B =3B =3B =3B =3B =3B&nbs= p=3B =3B =3B =3B =3B =3B =3B =3B =3B = =3B =3B =3B =3B =3B =3B =3B =3B =3B =3B= imenu-items))<BR>  =3B =3B =3B =3B =3B =3B =3B =3B =3B&nb= sp=3B =3B =3B =3B =3B =3B =3B =3B =3B ((js-= -pitem-h-begin pitem)<BR> =3B =3B =3B =3B =3B =3B&n= bsp=3B =3B =3B =3B =3B =3B =3B =3B =3B = =3B =3B =3B =3B (assert (integerp (js--pitem-h-begin pitem)))<B= R> =3B =3B =3B =3B =3B =3B =3B =3B =3B&= nbsp=3B =3B =3B =3B =3B =3B =3B =3B =3B&nbs= p=3B (setq subitems (list<BR> =3B =3B =3B =3B =3B = =3B =3B =3B =3B =3B =3B =3B =3B =3B =3B=  =3B =3B =3B =3B =3B =3B =3B =3B =3B&nb= sp=3B =3B =3B =3B =3B =3B =3B =3B =3B = =3B =3B (cons "[empty]"<BR> =3B =3B =3B =3B =3B&nbs= p=3B =3B =3B =3B =3B =3B =3B =3B =3B = =3B =3B =3B =3B =3B =3B =3B =3B =3B =3B=  =3B =3B =3B =3B =3B =3B =3B =3B =3B&nb= sp=3B =3B =3B =3B =3B =3B =3B =3B (js--maybe-ma= ke-marker<BR> =3B =3B =3B =3B =3B =3B =3B = =3B =3B =3B =3B =3B =3B =3B =3B =3B =3B=  =3B =3B =3B =3B =3B =3B =3B =3B =3B&nb= sp=3B =3B =3B =3B =3B =3B =3B =3B =3B = =3B =3B =3B =3B =3B =3B =3B (js--pitem-h-begin pite= m)))))<BR> =3B =3B =3B =3B =3B =3B =3B =3B&= nbsp=3B =3B =3B =3B =3B =3B =3B =3B =3B&nbs= p=3B =3B (push (cons pitem-name subitems)<BR> =3B =3B =3B&n= bsp=3B =3B =3B =3B =3B =3B =3B =3B =3B = =3B =3B =3B =3B =3B =3B =3B =3B =3B =3B=  =3B =3B =3B imenu-items))))<BR>  =3B =3B =3B =3B =3B =3B =3B =3B =3B&nb= sp=3B =3B (t (error "Unknown item type: %S" pitem-type))))<BR>  =3B =3B =3B =3B =3B =3B =3B =3B imenu-item= s))<BR>  =3B<BR>  =3B<BR> In GNU Emacs 23.2.1 (i386-mingw-nt6.1.7601)<BR> =3Bof 2010-05-08 on G41= R2F1<BR>Windowing system distributor `Microsoft Corp.'=2C version 6.1.7601<= BR>configured using `configure --with-gcc (3.4) --no-opt --cflags -Ic:/xpm/= include'<BR> Important settings:<BR> =3B value of $LC_ALL: nil<BR> =3B value of = $LC_COLLATE: nil<BR> =3B value of $LC_CTYPE: nil<BR> =3B value of $= LC_MESSAGES: nil<BR> =3B value of $LC_MONETARY: nil<BR> =3B value o= f $LC_NUMERIC: nil<BR> =3B value of $LC_TIME: nil<BR> =3B value of = $LANG: ENU<BR> =3B value of $XMODIFIERS: nil<BR> =3B locale-coding-= system: cp1252<BR> =3B default enable-multibyte-characters: t<BR> Major mode: Emacs-Lisp<BR> Minor modes in effect:<BR> =3B auto-revert-mode: t<BR> =3B yas/mino= r-mode: t<BR> =3B global-hl-line-mode: t<BR> =3B hl-line-mode: t<BR= > =3B global-auto-complete-mode: t<BR> =3B auto-complete-mode: t<BR= > =3B tooltip-mode: t<BR> =3B mouse-wheel-mode: t<BR> =3B menu-= bar-mode: t<BR> =3B file-name-shadow-mode: t<BR> =3B global-font-lo= ck-mode: t<BR> =3B font-lock-mode: t<BR> =3B blink-cursor-mode: t<B= R> =3B auto-encryption-mode: t<BR> =3B auto-compression-mode: t<BR>=  =3B line-number-mode: t<BR> =3B transient-mark-mode: t<BR> <BR>Recent messages:<BR>Mark saved where search started<BR>Mark set<BR>No c= losing parenthesis found<BR>Mark set<BR>Matches =3B =3B '(... [-73-= ]<BR>Matches (eval-after-load "js" [-74]<BR>Mark set [2 times]<BR>Saving fi= le c:/Users/Dino/elisp/emacs.el...<BR>Wrote c:/Users/Dino/elisp/emacs.el<BR= >Mark set<BR> Load-path shadows:<BR>/users/dino/elisp/linum hides c:/emacs/lisp/linum<BR>= /users/dino/elisp/css-mode hides c:/emacs/lisp/textmodes/css-mode<BR> Features:<BR>(shadow sort mail-extr message ecomplete rfc822 mml mml-sec<BR= >password-cache mm-decode mm-bodies mm-encode mailcap mail-parse rfc2231<BR= >rfc2047 rfc2045 qp ietf-drums mailabbrev nnheader gnus-util netrc<BR>time-= date mm-util mail-prsvr gmm-utils wid-edit mailheader canlock sha1<BR>hex-u= til hashcash mail-utils emacsbug help-mode view js find-func<BR>dired-aux f= lymake-for-jslint-for-wsh flymake-cursor flymake autopair<BR>espresso bytec= omp byte-compile ido json thingatpt etags imenu newcomment<BR>cc-mode cc-fo= nts cc-menus cc-cmds multi-isearch grep compile comint ring<BR>time-stamp s= gml-mode autorevert server cperl-mode paren mic-paren<BR>hideshow easymenu = cc-styles cc-align cc-engine cc-vars cc-defs dired<BR>regexp-opt defaultcon= tent yasnippet-bundle dropdown-list yasnippet<BR>easy-mmode cl cl-19 tfs sk= eleton httpget hl-line advice help-fns<BR>advice-preload auto-complete-conf= ig auto-complete edmacro kmacro popup<BR>tooltip ediff-hook vc-hooks lisp-f= loat-type mwheel dos-w32 disp-table<BR>ls-lisp w32-win w32-vars tool-bar dn= d fontset image fringe lisp-mode<BR>register page menu-bar rfn-eshadow time= r select scroll-bar mldrag mouse<BR>jit-lock font-lock syntax facemenu font= -core frame cham georgian<BR>utf-8-lang misc-lang vietnamese tibetan thai t= ai-viet lao korean<BR>japanese hebrew greek romanian slovak czech european = ethiopic indian<BR>cyrillic chinese case-table epa-hook jka-cmpr-hook help = simple abbrev<BR>loaddefs button minibuffer faces cus-face files text-prope= rties overlay<BR>md5 base64 format env code-pages mule custom widget<BR>has= htable-print-readable backquote make-network-process multi-tty emacs)<BR><B= R> </body> </html>= --_a96799d3-bcd9-40d4-83aa-39cac8955e13_--
Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.427 (Entity 5.427) Content-Type: text/plain; charset=utf-8 X-Loop: help-debbugs@HIDDEN From: help-debbugs@HIDDEN (GNU bug Tracking System) To: dino chiesa <dpchiesa@HIDDEN> Subject: bug#8724: Acknowledgement (23.2; js-mode imenu should be more thorough) Message-ID: <handler.8724.B.130624295011453.ack <at> debbugs.gnu.org> References: <BLU159-w1BD508A3BC8FDB4EA3337CE750@HIDDEN> X-Gnu-PR-Message: ack 8724 X-Gnu-PR-Package: emacs Reply-To: 8724 <at> debbugs.gnu.org Date: Tue, 24 May 2011 13:16:02 +0000 Thank you for filing a new bug report with GNU. This is an automatically generated reply to let you know your message has been received. Your message is being forwarded to the package maintainers and other interested parties for their attention; they will reply in due course. Your message has been sent to the package maintainer(s): bug-gnu-emacs@HIDDEN If you wish to submit further information on this problem, please send it to 8724 <at> debbugs.gnu.org. Please do not send mail to help-debbugs@HIDDEN unless you wish to report a problem with the Bug-tracking system. --=20 8724: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D8724 GNU Bug Tracking System Contact help-debbugs@HIDDEN with problems
X-Loop: help-debbugs@HIDDEN Subject: bug#8724: 23.2; js-mode imenu should be more thorough Resent-From: Daniel Colascione <dan.colascione@HIDDEN> Original-Sender: debbugs-submit-bounces <at> debbugs.gnu.org Resent-To: owner <at> debbugs.gnu.org Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Sun, 19 Jun 2011 20:41:01 +0000 Resent-Message-ID: <handler.8724.B8724.130851604723416 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 8724 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: dino chiesa <dpchiesa@HIDDEN> Cc: 8724 <at> debbugs.gnu.org Received: via spool by 8724-submit <at> debbugs.gnu.org id=B8724.130851604723416 (code B ref 8724); Sun, 19 Jun 2011 20:41:01 +0000 Received: (at 8724) by debbugs.gnu.org; 19 Jun 2011 20:40:47 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1QYOnX-00065c-HN for submit <at> debbugs.gnu.org; Sun, 19 Jun 2011 16:40:47 -0400 Received: from mail-pv0-f172.google.com ([74.125.83.172]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from <dan.colascione@HIDDEN>) id 1QYOnV-00065P-2H for 8724 <at> debbugs.gnu.org; Sun, 19 Jun 2011 16:40:45 -0400 Received: by pvh18 with SMTP id 18so3104680pvh.3 for <8724 <at> debbugs.gnu.org>; Sun, 19 Jun 2011 13:40:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:message-id:date:from:user-agent:mime-version :newsgroups:to:cc:subject:references:in-reply-to:x-enigmail-version :content-type:content-transfer-encoding; bh=igT1j9NWej+wQYxx4l5oV5mil/VAVwwoiT6qg9EtJ/Y=; b=GBqABLwe8lGOFYELxLhY4/6EdIpF3JEhMg2R8Qz/Xe2MVXSuNqaausSh5Eo0soNGa7 ZAbJgXWL0BF6IBzCZr0N50KaK2UHPfqspIsqe2070mE9EdlDwiiVrMRnMUVVlZYsLX7k OSqcOUkI5dqwX1tgmhtPtmcUdLuVh6RBjTe0w= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:newsgroups:to:cc :subject:references:in-reply-to:x-enigmail-version:content-type :content-transfer-encoding; b=cxnZ7kYsipFKexRUCZ/plrZ0wMZzIy1LtjkNmx+NhbqB19+TFCWnLDAVseicYxbI7D iJdRe5DoMqOzoz0OAF7uvw1jFrneVP7MtE9BnFsaFMq5+SN8ALG5oP0VcWLiH+jBnA7O er8cunlbFGjT3XuWQ+X7AZJVIEQyVp7uH7E3w= Received: by 10.68.30.71 with SMTP id q7mr1723724pbh.519.1308516039367; Sun, 19 Jun 2011 13:40:39 -0700 (PDT) Received: from edith.local (c-24-18-179-193.hsd1.wa.comcast.net [24.18.179.193]) by mx.google.com with ESMTPS id o2sm2784577pbj.33.2011.06.19.13.40.38 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 19 Jun 2011 13:40:38 -0700 (PDT) Message-ID: <4DFE5EC4.3070103@HIDDEN> Date: Sun, 19 Jun 2011 13:40:36 -0700 From: Daniel Colascione <dan.colascione@HIDDEN> User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.17) Gecko/20110414 Thunderbird/3.1.10 MIME-Version: 1.0 Newsgroups: gmane.emacs.bugs References: <BLU159-w1BD508A3BC8FDB4EA3337CE750@HIDDEN> In-Reply-To: <BLU159-w1BD508A3BC8FDB4EA3337CE750@HIDDEN> X-Enigmail-Version: 1.1.1 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Spam-Score: -4.1 (----) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <http://debbugs.gnu.org/pipermail/debbugs-submit> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Sender: debbugs-submit-bounces <at> debbugs.gnu.org Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org X-Spam-Score: -4.1 (----) -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi Dino, Thanks for the feature suggestion and code. On 5/24/11 5:51 AM, dino chiesa wrote: > > Module /emacs/lisp/progmodes/js.el > > In js-mode, editing a short javascript file, the imenu indexing works > nicely but the actual menu is incomplete, truncated. The defun > js--pitems-to-imenu seems to make an insufficient effort, when > nested function definitions are used in the source. > > For example, supposing this js source: > > jQuery(document).ready(function () { > var $th = jQuery('thead > tr > th'); > $th.each(function(column, elt) { > jQuery(this).addClass('sortable').click(function() { > ... > }); > }); > }); > > (this is fairly typical with javascript) Fair enough. > > In this case js-mode will index all of the anonymous functions, but will > produce an imenu that contains only the outer anonymous function. This is > done in js--pitems-to-imenu. Also, in the same defun, the imenu entry uses > "Unknown" as the name of the anonymous function. > > I propose 2 things: > - replace the name "unknown" with "Anonymous" > - recurse into js--pitems-to-imenu for functions that define > child functions. > > The proposed new code for the defun is: I'll see what I can do about looking at your code. In the meantime, it would be helpful if you could submit your changes as a patch against the latest code in trunk. Thanks, Daniel Colascione -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (Darwin) iEYEARECAAYFAk3+XsIACgkQ17c2LVA10Vta4ACfab5AvYokQAfTTOn+hmwKIRwl buIAoJC08O+cthOUL7UTHo+er6kZcFYT =bT2r -----END PGP SIGNATURE-----
X-Loop: help-debbugs@HIDDEN Subject: bug#8724: 23.2; js-mode imenu should be more thorough Resent-From: Daniel Colascione <dan.colascione@HIDDEN> Original-Sender: debbugs-submit-bounces <at> debbugs.gnu.org Resent-To: owner <at> debbugs.gnu.org Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Sun, 19 Jun 2011 20:46:02 +0000 Resent-Message-ID: <handler.8724.B.130851631925405 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 8724 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 8724 <at> debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@HIDDEN X-Debbugs-Original-Cc: 8724 <at> debbugs.gnu.org Received: via spool by submit <at> debbugs.gnu.org id=B.130851631925405 (code B ref -1); Sun, 19 Jun 2011 20:46:02 +0000 Received: (at submit) by debbugs.gnu.org; 19 Jun 2011 20:45:19 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1QYOru-0006bB-AJ for submit <at> debbugs.gnu.org; Sun, 19 Jun 2011 16:45:18 -0400 Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from <geb-bug-gnu-emacs@HIDDEN>) id 1QYOrs-0006R0-9C for submit <at> debbugs.gnu.org; Sun, 19 Jun 2011 16:45:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <geb-bug-gnu-emacs@HIDDEN>) id 1QYOrm-0005e5-9a for submit <at> debbugs.gnu.org; Sun, 19 Jun 2011 16:45:11 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_MED,T_RP_MATCHES_RCVD,T_TO_NO_BRKTS_FREEMAIL autolearn=unavailable version=3.3.1 Received: from lists.gnu.org ([140.186.70.17]:52158) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <geb-bug-gnu-emacs@HIDDEN>) id 1QYOrm-0005e1-89 for submit <at> debbugs.gnu.org; Sun, 19 Jun 2011 16:45:10 -0400 Received: from eggs.gnu.org ([140.186.70.92]:58308) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <geb-bug-gnu-emacs@HIDDEN>) id 1QYOrk-0007Go-Va for bug-gnu-emacs@HIDDEN; Sun, 19 Jun 2011 16:45:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <geb-bug-gnu-emacs@HIDDEN>) id 1QYOrj-0005ci-JR for bug-gnu-emacs@HIDDEN; Sun, 19 Jun 2011 16:45:08 -0400 Received: from lo.gmane.org ([80.91.229.12]:45739) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <geb-bug-gnu-emacs@HIDDEN>) id 1QYOrj-0005cF-AN for bug-gnu-emacs@HIDDEN; Sun, 19 Jun 2011 16:45:07 -0400 Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from <geb-bug-gnu-emacs@HIDDEN>) id 1QYOrh-0003cz-E6 for bug-gnu-emacs@HIDDEN; Sun, 19 Jun 2011 22:45:05 +0200 Received: from c-24-18-179-193.hsd1.wa.comcast.net ([24.18.179.193]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for <bug-gnu-emacs@HIDDEN>; Sun, 19 Jun 2011 22:45:05 +0200 Received: from dan.colascione by c-24-18-179-193.hsd1.wa.comcast.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for <bug-gnu-emacs@HIDDEN>; Sun, 19 Jun 2011 22:45:05 +0200 X-Injected-Via-Gmane: http://gmane.org/ From: Daniel Colascione <dan.colascione@HIDDEN> Date: Sun, 19 Jun 2011 13:40:36 -0700 Lines: 58 Message-ID: <4DFE5EC4.3070103@HIDDEN> References: <BLU159-w1BD508A3BC8FDB4EA3337CE750@HIDDEN> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@HIDDEN X-Gmane-NNTP-Posting-Host: c-24-18-179-193.hsd1.wa.comcast.net User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.17) Gecko/20110414 Thunderbird/3.1.10 In-Reply-To: <BLU159-w1BD508A3BC8FDB4EA3337CE750@HIDDEN> X-Enigmail-Version: 1.1.1 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 140.186.70.17 X-Spam-Score: -5.2 (-----) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <http://debbugs.gnu.org/pipermail/debbugs-submit> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Sender: debbugs-submit-bounces <at> debbugs.gnu.org Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org X-Spam-Score: -5.2 (-----) -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi Dino, Thanks for the feature suggestion and code. On 5/24/11 5:51 AM, dino chiesa wrote: > > Module /emacs/lisp/progmodes/js.el > > In js-mode, editing a short javascript file, the imenu indexing works > nicely but the actual menu is incomplete, truncated. The defun > js--pitems-to-imenu seems to make an insufficient effort, when > nested function definitions are used in the source. > > For example, supposing this js source: > > jQuery(document).ready(function () { > var $th = jQuery('thead > tr > th'); > $th.each(function(column, elt) { > jQuery(this).addClass('sortable').click(function() { > ... > }); > }); > }); > > (this is fairly typical with javascript) Fair enough. > > In this case js-mode will index all of the anonymous functions, but will > produce an imenu that contains only the outer anonymous function. This is > done in js--pitems-to-imenu. Also, in the same defun, the imenu entry uses > "Unknown" as the name of the anonymous function. > > I propose 2 things: > - replace the name "unknown" with "Anonymous" > - recurse into js--pitems-to-imenu for functions that define > child functions. > > The proposed new code for the defun is: I'll see what I can do about looking at your code. In the meantime, it would be helpful if you could submit your changes as a patch against the latest code in trunk. Thanks, Daniel Colascione -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (Darwin) iEYEARECAAYFAk3+XsIACgkQ17c2LVA10Vta4ACfab5AvYokQAfTTOn+hmwKIRwl buIAoJC08O+cthOUL7UTHo+er6kZcFYT =bT2r -----END PGP SIGNATURE-----
X-Loop: help-debbugs@HIDDEN Subject: bug#8724: 23.2; js-mode imenu should be more thorough Resent-From: Lars Ingebrigtsen <larsi@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Wed, 02 Jun 2021 08:00:02 +0000 Resent-Message-ID: <handler.8724.B8724.16226207448410 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 8724 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Daniel Colascione <dan.colascione@HIDDEN> Cc: dino chiesa <dpchiesa@HIDDEN>, 8724 <at> debbugs.gnu.org Received: via spool by 8724-submit <at> debbugs.gnu.org id=B8724.16226207448410 (code B ref 8724); Wed, 02 Jun 2021 08:00:02 +0000 Received: (at 8724) by debbugs.gnu.org; 2 Jun 2021 07:59:04 +0000 Received: from localhost ([127.0.0.1]:38701 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1loLmJ-0002Ba-Nr for submit <at> debbugs.gnu.org; Wed, 02 Jun 2021 03:59:03 -0400 Received: from quimby.gnus.org ([95.216.78.240]:55204) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <larsi@HIDDEN>) id 1loLmI-0002B7-Jw for 8724 <at> debbugs.gnu.org; Wed, 02 Jun 2021 03:59:03 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=RRAUR2TTe23rVaNin0XlAI8C3QUnSXLWGP+0TwVtz0g=; b=ppLc1a0kXEdxeUZ0BXC5dlkfEG nH9XI9PabeMNQtYJHqpfHPFU9n48O2QH0aJ4pWYtRK2ox90g/T2JSDteK6iqynrf5be6ngKs8/Ncb 6wN0P5bfXnI1CYlTIEfmpNTIBGTXGdWYY6GaVFue5Ik0qkKKEpq5AbeWAQQzo5nBe+n8=; Received: from cm-84.212.220.105.getinternet.no ([84.212.220.105] helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from <larsi@HIDDEN>) id 1loLm8-0003Xr-H3; Wed, 02 Jun 2021 09:58:56 +0200 From: Lars Ingebrigtsen <larsi@HIDDEN> References: <BLU159-w1BD508A3BC8FDB4EA3337CE750@HIDDEN> <4DFE5EC4.3070103@HIDDEN> X-Now-Playing: Nobukazu Takemura's _Child's View_: "Pastral Waltz" Date: Wed, 02 Jun 2021 09:58:50 +0200 In-Reply-To: <4DFE5EC4.3070103@HIDDEN> (Daniel Colascione's message of "Sun, 19 Jun 2011 13:40:36 -0700") Message-ID: <87y2bselz9.fsf@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Daniel Colascione <dan.colascione@HIDDEN> writes: >> I propose 2 things: >> - replace the name "unknown" with "Anonymous" >> - recurse into js--pitems-to-imenu for functions that define >> child functions. >> >> The proposed new code for the defun is [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.7 (-) Daniel Colascione <dan.colascione@HIDDEN> writes: >> I propose 2 things: >> - replace the name "unknown" with "Anonymous" >> - recurse into js--pitems-to-imenu for functions that define >> child functions. >> >> The proposed new code for the defun is: > > I'll see what I can do about looking at your code. In the meantime, it > would be helpful if you could submit your changes as a patch against the > latest code in trunk. This was nine years ago -- was there any progress with this? (It sounds like a good change, but I haven't looked at the code.) -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no
X-Loop: help-debbugs@HIDDEN Subject: bug#8724: 23.2; js-mode imenu should be more thorough Resent-From: Dmitry Gutov <dgutov@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Sat, 05 Jun 2021 00:25:02 +0000 Resent-Message-ID: <handler.8724.B8724.162285269122712 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 8724 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Lars Ingebrigtsen <larsi@HIDDEN>, Daniel Colascione <dan.colascione@HIDDEN> Cc: dino chiesa <dpchiesa@HIDDEN>, 8724 <at> debbugs.gnu.org Received: via spool by 8724-submit <at> debbugs.gnu.org id=B8724.162285269122712 (code B ref 8724); Sat, 05 Jun 2021 00:25:02 +0000 Received: (at 8724) by debbugs.gnu.org; 5 Jun 2021 00:24:51 +0000 Received: from localhost ([127.0.0.1]:48071 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1lpK7P-0005uG-B0 for submit <at> debbugs.gnu.org; Fri, 04 Jun 2021 20:24:51 -0400 Received: from mail-wm1-f44.google.com ([209.85.128.44]:45760) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <raaahh@HIDDEN>) id 1lpK7N-0005u2-Jc for 8724 <at> debbugs.gnu.org; Fri, 04 Jun 2021 20:24:50 -0400 Received: by mail-wm1-f44.google.com with SMTP id v206-20020a1cded70000b02901a586d3fa23so2201255wmg.4 for <8724 <at> debbugs.gnu.org>; Fri, 04 Jun 2021 17:24:49 -0700 (PDT) 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=964VyqOXVoQoHGuaSR7YRMR0e4TsIoP0WnwULqXZPEY=; b=jPNdKEt/if9HxfymZpCJiOhnDCX31SHomY53PkbhQggUem9d1uLVkiwIu/K2SFjhDV mWS8nACEJaZxgzxJJOZMGBcVyqc2iQFmWwF7fqkuIEt0CjH0CkxGYwxKDhxXu8EOiLc5 ma0SvDhQXuZZ8zwQeuIjhmxWXE8eRyscQKbSv26IelpWTWEE/34r9PEccxDb9oKGdqfA 2OwM3w/pgpQ8pv45DD5ViOL1gKiqj9XAlqCXvtfuXXS1hE4jE077wZNC9Bc+o0hggMsM RKXX1rsymg6DySn+RurGNNSo6IMHdlV/B73VVrxEgUFiaQjcI8mUJ+eYmgokQm6zMLrB lEbA== 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=964VyqOXVoQoHGuaSR7YRMR0e4TsIoP0WnwULqXZPEY=; b=X8nLKl3JvNU3LK/SJZ9ANc4WMsXCtg+w9s/whUg1fzSLYZn6KSD2ABOXk4iNVbXSUN C2PKV451enNZIuGZ52CfJUrFPSZA5ZmvGf4vThQo1stjQynag04f1CX+tVHEZXyGyAHq ar5Fs3tVaevluPjHUtL200e9e49QXeSx7QmudWkmkmNgJSwK9LvlzKgjMxkww8V8A1ka SM3T0eSixlwi3qY/Hza+FvmsZbskGae6523TZUiOrpz2HVg7Ubl4+4BUUc4n7qI9x84B i6hJtETmBqrQ5Dk7gld/xjO3wWpx2/8uJKUDxnUSXKNw8NIWlVh5bUK1TLDoIZWSC80d vbvQ== X-Gm-Message-State: AOAM532IIKhvz+/uvQKkr3VYrPs9hOlWU5DeUA64gi53AlwUg7m4t9ug b+t9fU2qEdnvIY4c1PKEGz3G5WWqis8= X-Google-Smtp-Source: ABdhPJzCoPVmPI7iDitrQBZOApdyZAIXz5Bi2OZuA8FBex5YO353hNKBc11DYPYXJULoGpCnnq7kkQ== X-Received: by 2002:a7b:c1c5:: with SMTP id a5mr5991367wmj.134.1622852683481; Fri, 04 Jun 2021 17:24:43 -0700 (PDT) Received: from [192.168.0.6] ([46.251.119.176]) by smtp.googlemail.com with ESMTPSA id u18sm6869326wmj.15.2021.06.04.17.24.42 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 04 Jun 2021 17:24:42 -0700 (PDT) References: <BLU159-w1BD508A3BC8FDB4EA3337CE750@HIDDEN> <4DFE5EC4.3070103@HIDDEN> <87y2bselz9.fsf@HIDDEN> From: Dmitry Gutov <dgutov@HIDDEN> Message-ID: <96de25bd-511a-67c7-9253-1e7e29b1e021@HIDDEN> Date: Sat, 5 Jun 2021 03:24:41 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 MIME-Version: 1.0 In-Reply-To: <87y2bselz9.fsf@HIDDEN> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: -0.1 (/) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.1 (-) On 02.06.2021 10:58, Lars Ingebrigtsen wrote: > This was nine years ago -- was there any progress with this? (It sounds > like a good change, but I haven't looked at the code.) Someone should really work in that direction, since in these nine years JS has grown more ways to define a function: e.g. arrow functions, or 'const <function name> = ...'. I've tried simply replacing the definition. The patch kinda works, except I'm not sure about the (top) and (bottom) items that it adds (we don't have any precedent for this, so I vote no), and there's some sort of duplication of the entries: I see both (top) and the enclosed function name repeated an extra time in the imenu index.
X-Loop: help-debbugs@HIDDEN Subject: bug#8724: 23.2; js-mode imenu should be more thorough Resent-From: Stefan Kangas <stefankangas@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Wed, 10 Jan 2024 11:56:02 +0000 Resent-Message-ID: <handler.8724.B8724.17048877203292 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 8724 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Dmitry Gutov <dgutov@HIDDEN> Cc: Lars Ingebrigtsen <larsi@HIDDEN>, Daniel Colascione <dan.colascione@HIDDEN>, dino chiesa <dpchiesa@HIDDEN>, 8724 <at> debbugs.gnu.org Received: via spool by 8724-submit <at> debbugs.gnu.org id=B8724.17048877203292 (code B ref 8724); Wed, 10 Jan 2024 11:56:02 +0000 Received: (at 8724) by debbugs.gnu.org; 10 Jan 2024 11:55:20 +0000 Received: from localhost ([127.0.0.1]:42354 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1rNXB2-0000r1-92 for submit <at> debbugs.gnu.org; Wed, 10 Jan 2024 06:55:20 -0500 Received: from mail-ed1-x52e.google.com ([2a00:1450:4864:20::52e]:55554) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <stefankangas@HIDDEN>) id 1rNXAz-0000qh-OX for 8724 <at> debbugs.gnu.org; Wed, 10 Jan 2024 06:55:18 -0500 Received: by mail-ed1-x52e.google.com with SMTP id 4fb4d7f45d1cf-555f581aed9so4711363a12.3 for <8724 <at> debbugs.gnu.org>; Wed, 10 Jan 2024 03:55:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1704887704; x=1705492504; darn=debbugs.gnu.org; h=cc:to:subject:message-id:date:mime-version:references:in-reply-to :from:from:to:cc:subject:date:message-id:reply-to; bh=VWYT732sR1QNyAVmGk+dv54voVJPNd7S+1BvoIhadlQ=; b=CcDZ0vtgOICLCQT4dKwoJJTQXMGfglboIa66tXcC05ZOe8b18sPYC6n6MDFig9sgv4 oZDhEgx5+lvifzU69Gah9FjrtIWBOsQ+776Bxsv1eXLkfZI/scM4kLerbD7e4LDVnUG5 W1HaRTTCGlI9JErxQlVGBOFSyEmscoYERi2oyC8njfhLIqvFefGlQgxgB+ojEToUFWuZ 4GQbLpMC0CXfOeBL2A26jhAG6e50QfnhC/y08WifKGaT44dQQbg9n2IZWw/smGeXn+FK Qa6vxzd4yxkqX/7Rj6YnbcZ1M7w4+lMJ4MmKLTLuZcxEqP2ERWTbvC4dAhhYXkuylPEM ecHg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704887704; x=1705492504; h=cc:to:subject:message-id:date:mime-version:references:in-reply-to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=VWYT732sR1QNyAVmGk+dv54voVJPNd7S+1BvoIhadlQ=; b=TqnLzMY1MqxlVOPNV62W8nnJB8wv7roTUOYcM4bObuDuodu7XNj4CyRvkPrtYUDrji NOU8uEb4O4/AWZV8Ocm7N5VCjohrmN8i/cEXtY2YIXgVwUzRqpqDIXFOoKiRfUgkYCfa XvdUO3tJlBVUbTA4y49E3tGN0hJjDn0Xg/PaII/i3dBypFqpfS1n8tNCD/oUWDML7Soc OGAYu6w37i+Pr50XVs/oqwwnIpX5L6t6G/j2v3qi2gNUOq2KMX7X2+Jrdq7DWk2Xi3vl 7rXu8KXUjWpmVh7bvi+I+b3UA4/xNt6GjrPjE3CLwIVp3Y64TKVsRco4kpI2mlSA2X0I FK0w== X-Gm-Message-State: AOJu0YxgvpRfNqXYcZepy78khmcVSLw1YnyW86PvphyEckcyLZ1sH5ld GX9mqD64W/H6FEzypg96NNGazuIsM1KsXxUiP3w= X-Google-Smtp-Source: AGHT+IEZQgW04d7z/nIU46ydZEcgPtyxrIIOWeT98frHuAWiE9PZ2TD7f1RoR8OSuHsO9RpQboo/+H/uPg3vOB2ePuo= X-Received: by 2002:a50:b410:0:b0:558:5cd2:7646 with SMTP id b16-20020a50b410000000b005585cd27646mr336895edh.51.1704887704414; Wed, 10 Jan 2024 03:55:04 -0800 (PST) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Wed, 10 Jan 2024 03:55:03 -0800 From: Stefan Kangas <stefankangas@HIDDEN> In-Reply-To: <96de25bd-511a-67c7-9253-1e7e29b1e021@HIDDEN> (Dmitry Gutov's message of "Sat, 5 Jun 2021 03:24:41 +0300") References: <BLU159-w1BD508A3BC8FDB4EA3337CE750@HIDDEN> <4DFE5EC4.3070103@HIDDEN> <87y2bselz9.fsf@HIDDEN> <96de25bd-511a-67c7-9253-1e7e29b1e021@HIDDEN> MIME-Version: 1.0 Date: Wed, 10 Jan 2024 03:55:03 -0800 Message-ID: <CADwFkmm+muUhA8xX7-WO9rLKJod6shmMqTt635_jZMHqNjmP8g@HIDDEN> Content-Type: text/plain; charset="UTF-8" X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) Dmitry Gutov <dgutov@HIDDEN> writes: > On 02.06.2021 10:58, Lars Ingebrigtsen wrote: >> This was nine years ago -- was there any progress with this? (It sounds >> like a good change, but I haven't looked at the code.) > > Someone should really work in that direction, since in these nine years JS has > grown more ways to define a function: e.g. arrow functions, or 'const <function > name> = ...'. > > I've tried simply replacing the definition. > > The patch kinda works, except I'm not sure about the (top) and (bottom) items > that it adds (we don't have any precedent for this, so I vote no), and there's > some sort of duplication of the entries: I see both (top) and the enclosed > function name repeated an extra time in the imenu index. Did you make any further progress here?
X-Loop: help-debbugs@HIDDEN Subject: bug#8724: 23.2; js-mode imenu should be more thorough Resent-From: Dmitry Gutov <dgutov@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Thu, 11 Jan 2024 00:20:02 +0000 Resent-Message-ID: <handler.8724.B8724.170493238027342 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 8724 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Stefan Kangas <stefankangas@HIDDEN> Cc: Lars Ingebrigtsen <larsi@HIDDEN>, Daniel Colascione <dan.colascione@HIDDEN>, dino chiesa <dpchiesa@HIDDEN>, 8724 <at> debbugs.gnu.org Received: via spool by 8724-submit <at> debbugs.gnu.org id=B8724.170493238027342 (code B ref 8724); Thu, 11 Jan 2024 00:20:02 +0000 Received: (at 8724) by debbugs.gnu.org; 11 Jan 2024 00:19:40 +0000 Received: from localhost ([127.0.0.1]:43581 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1rNinM-00076w-Aq for submit <at> debbugs.gnu.org; Wed, 10 Jan 2024 19:19:40 -0500 Received: from forward500a.mail.yandex.net ([178.154.239.80]:45362) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <dgutov@HIDDEN>) id 1rNinI-00076i-66 for 8724 <at> debbugs.gnu.org; Wed, 10 Jan 2024 19:19:38 -0500 Received: from mail-nwsmtp-smtp-production-main-74.vla.yp-c.yandex.net (mail-nwsmtp-smtp-production-main-74.vla.yp-c.yandex.net [IPv6:2a02:6b8:c1d:47bd:0:640:2492:0]) by forward500a.mail.yandex.net (Yandex) with ESMTP id 4A385615DA; Thu, 11 Jan 2024 03:19:34 +0300 (MSK) Received: by mail-nwsmtp-smtp-production-main-74.vla.yp-c.yandex.net (smtp/Yandex) with ESMTPSA id VJWNAV1rCCg0-dEPMK1wO; Thu, 11 Jan 2024 03:19:33 +0300 X-Yandex-Fwd: 1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1704932373; bh=WRbAIijwOjH3UAObcRRsDwxrACB0qGnbzzmoE4EIt6A=; h=In-Reply-To:From:Subject:Message-ID:Cc:References:Date:To; b=nGDEr9663WE9zjD6RQHKZ9iLOgCYMgSk730YlGxiOQ84dEthI7A1HxSabkoSaDWe9 MsA/zNl2xdru4caYlESTtlERUyFL6XXk2D+gcKMVrl6X8IfWEfO7xZ/+SoD0Vhg2Ni CmXF5fx5ztJEk7L/x8v5um+kOkZDp/ByOz6GBJHQ= Authentication-Results: mail-nwsmtp-smtp-production-main-74.vla.yp-c.yandex.net; dkim=pass header.i=@yandex.ru Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailauth.nyi.internal (Postfix) with ESMTP id 1B41C27C0061; Wed, 10 Jan 2024 19:19:30 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Wed, 10 Jan 2024 19:19:31 -0500 X-ME-Sender: <xms:EjSfZdn-_hyreTt7TXNkprkqf6PQYhJP_Xr1GNTNRCJPxrkic23mOw> <xme:EjSfZY2Ui9fn1ez4Q593ogIy2R_w54mqtRjrKp2rVG4Y62mLe7sTAuem1nkK76Xmz GHAGy90WxwXD_uNRbY> X-ME-Received: <xmr:EjSfZTpGQV2rk45cac0CgkrinXpazx4kmde2CFL5HXvPOJSkrWF5AyyeOi2MFPuLlXqn> X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrvdeivddgvddtucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkfffgggfuffvvehfhfgjtgfgsehtjeertddtvdejnecuhfhrohhmpeffmhhi thhrhicuifhuthhovhcuoegughhuthhovheshigrnhguvgigrdhruheqnecuggftrfgrth htvghrnhepiefhjeeuveetffffvdefteffffekhfeuudejieehheeiudelgfehgffffedu ffdunecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepug hguhhtohhvodhmvghsmhhtphgruhhthhhpvghrshhonhgrlhhithihqddufeeffeelleeh hedvqddvleegjeejjeejiedqughguhhtohhvpeephigrnhguvgigrdhruhesfhgrshhtmh grihhlrdgtohhm X-ME-Proxy: <xmx:EjSfZdluPqiVtI4ZjXx57cr_kjS9ljfYyE1MPU6ds5X2Szn4mvzOZQ> <xmx:EjSfZb3se1TzwtP2njo3SeTn4YXiyYGDbr7EuOKlMZkLnmCONAEjRQ> <xmx:EjSfZcs2mPTkc0gWbQaehPWJD4opLkUmuhvMUyIc1v5z4X4EQyiDYg> <xmx:EjSfZcyKpvcmZZuNtgyn_Mc6wwwMxpXKaRfnMsTMiwzzkTWuBz0erQ> Feedback-ID: ib1d9465d:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 10 Jan 2024 19:19:29 -0500 (EST) Message-ID: <c2ea25ec-6f87-419f-bfae-951fac1c03bc@HIDDEN> Date: Thu, 11 Jan 2024 02:19:27 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Content-Language: en-US References: <BLU159-w1BD508A3BC8FDB4EA3337CE750@HIDDEN> <4DFE5EC4.3070103@HIDDEN> <87y2bselz9.fsf@HIDDEN> <96de25bd-511a-67c7-9253-1e7e29b1e021@HIDDEN> <CADwFkmm+muUhA8xX7-WO9rLKJod6shmMqTt635_jZMHqNjmP8g@HIDDEN> From: Dmitry Gutov <dgutov@HIDDEN> In-Reply-To: <CADwFkmm+muUhA8xX7-WO9rLKJod6shmMqTt635_jZMHqNjmP8g@HIDDEN> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) On 10/01/2024 13:55, Stefan Kangas wrote: > Dmitry Gutov <dgutov@HIDDEN> writes: > >> On 02.06.2021 10:58, Lars Ingebrigtsen wrote: >>> This was nine years ago -- was there any progress with this? (It sounds >>> like a good change, but I haven't looked at the code.) >> >> Someone should really work in that direction, since in these nine years JS has >> grown more ways to define a function: e.g. arrow functions, or 'const <function >> name> = ...'. >> >> I've tried simply replacing the definition. >> >> The patch kinda works, except I'm not sure about the (top) and (bottom) items >> that it adds (we don't have any precedent for this, so I vote no), and there's >> some sort of duplication of the entries: I see both (top) and the enclosed >> function name repeated an extra time in the imenu index. > > Did you make any further progress here? Sorry, I did not. It's still marked as "todo" in my email folder, but not of high priority, so far. And in this day and year, someone might give a shot at porting js2-mode's imenu generator (quite featureful, I should say) to tree-sitter's API (in js-ts-mode).
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997 nCipher Corporation Ltd,
1994-97 Ian Jackson.