From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Andreas Politz Newsgroups: gmane.emacs.bugs Subject: bug#14029: 24.2.50; [PATCH] imenu problems with special elements Date: Fri, 29 Nov 2013 14:36:48 +0100 Message-ID: <87pppj2utr.fsf@hochschule-trier.de> References: <87hak4gram.fsf@fh-trier.de> <5ABDF35DFCF64DEEAA37AFAE5048578D@us.oracle.com> <87ip4iwfoe.fsf@fh-trier.de> <878v5ew1pp.fsf@fh-trier.de> <87iovhqrve.fsf@yandex.ru> <87vbzhl05s.fsf@hochschule-trier.de> <52980D7D.2060902@yandex.ru> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: ger.gmane.org 1385732295 2836 80.91.229.3 (29 Nov 2013 13:38:15 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 29 Nov 2013 13:38:15 +0000 (UTC) Cc: 14029-done@debbugs.gnu.org To: Dmitry Gutov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Nov 29 14:38:20 2013 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1VmOGx-00007a-UF for geb-bug-gnu-emacs@m.gmane.org; Fri, 29 Nov 2013 14:38:20 +0100 Original-Received: from localhost ([::1]:47371 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VmOGx-000535-EF for geb-bug-gnu-emacs@m.gmane.org; Fri, 29 Nov 2013 08:38:19 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:38443) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VmOGp-00051m-5E for bug-gnu-emacs@gnu.org; Fri, 29 Nov 2013 08:38:16 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VmOGj-00049b-Ko for bug-gnu-emacs@gnu.org; Fri, 29 Nov 2013 08:38:11 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:35886) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VmOGj-00049A-6F for bug-gnu-emacs@gnu.org; Fri, 29 Nov 2013 08:38:05 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1VmOGh-0006V5-NK for bug-gnu-emacs@gnu.org; Fri, 29 Nov 2013 08:38:04 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Andreas Politz Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 29 Nov 2013 13:38:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 14029 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 14029-done@debbugs.gnu.org id=D14029.138573223324919 (code D ref 14029); Fri, 29 Nov 2013 13:38:02 +0000 Original-Received: (at 14029-done) by debbugs.gnu.org; 29 Nov 2013 13:37:13 +0000 Original-Received: from localhost ([127.0.0.1]:49905 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VmOFs-0006Tq-BC for submit@debbugs.gnu.org; Fri, 29 Nov 2013 08:37:12 -0500 Original-Received: from gateway-a.fh-trier.de ([143.93.54.181]:36574) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VmOFp-0006SM-25 for 14029-done@debbugs.gnu.org; Fri, 29 Nov 2013 08:37:10 -0500 X-Virus-Scanned: by Amavisd-new + McAfee uvscan + ClamAV [Rechenzentrum Hochschule Trier] Original-Received: from luca (dslb-084-059-246-148.pools.arcor-ip.net [84.59.246.148]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: politza) by gateway-a.fh-trier.de (Postfix) with ESMTPSA id E7ED41788CF2; Fri, 29 Nov 2013 14:36:48 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha1; c=simple/simple; d=hochschule-trier.de; s=default; t=1385732209; bh=diYkMKNnQbP3lHD2zQscUvnLtDM=; h=From:To:Cc:Subject:References:Date:In-Reply-To:Message-ID: MIME-Version:Content-Type; b=gN8ZrHnuAdrRSM4a1lDFyPOvqWRIws4RkGefD+ODVCQ1t6WySqsgflIl/4uvJeH2B XMgqIIzzTnzHy/s0D8pYkVopkBJwWqxaZcH2fkUC7Pbh2RkF3M9kr7XkZHVepPXsel 9brr2wgB4o+fWZbZlvEiQRH8w0zsskS7BK9M46ec= Original-Received: from politza by luca with local (Exim 4.72) (envelope-from ) id 1VmOFU-0004Fw-8V; Fri, 29 Nov 2013 14:36:48 +0100 In-Reply-To: <52980D7D.2060902@yandex.ru> (Dmitry Gutov's message of "Fri, 29 Nov 2013 05:43:57 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 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.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:81093 Archived-At: --=-=-= Content-Type: text/plain Dmitry Gutov writes: > One note: > >>> Is it possible for (cadr item) to be a list and also be `functionp' and yet not >>> have its car be `lambda'? > > The documentation allows FUNCTION in the third element, but > imenu--subalist-p' is checking whether the second element is a > function. Yes, this doesn't make much sense. I guess this function check was intended to distinguish a special element (INDEX-NAME POS FN . ARGS) from a sub-alist element (INDEX-NAME . SUB-ALIST). The check would make sense, if this function was applied to the cdr of an element, i.e. check if the argument is a SUB-ALIST. But this is not how this function is used in imenu.el . I might have initially (and falsely) determined this as the source of some bug. -ap P.S.: There is another dot missing in the documentation. --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=imenu.patch === modified file 'lisp/imenu.el' *** lisp/imenu.el 2013-11-29 03:38:20 +0000 --- lisp/imenu.el 2013-11-29 13:30:58 +0000 *************** *** 463,469 **** To \"go to\" a special element means applying FUNCTION to INDEX-NAME, POSITION, and the ARGUMENTS. ! A nested sub-alist element looks like (INDEX-NAME SUB-ALIST). The function `imenu--subalist-p' tests an element and returns t if it is a sub-alist. --- 463,469 ---- To \"go to\" a special element means applying FUNCTION to INDEX-NAME, POSITION, and the ARGUMENTS. ! A nested sub-alist element looks like (INDEX-NAME . SUB-ALIST). The function `imenu--subalist-p' tests an element and returns t if it is a sub-alist. --=-=-=--