GNU bug report logs - #14029
24.2.50; [PATCH] imenu problems with special elements

Previous Next

Package: emacs;

Reported by: Andreas Politz <politza <at> fh-trier.de>

Date: Fri, 22 Mar 2013 01:27:02 UTC

Severity: normal

Tags: patch

Found in version 24.2.50

Fixed in version 24.4

Done: Dmitry Gutov <dgutov <at> yandex.ru>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Andreas Politz <politza <at> hochschule-trier.de>
To: Dmitry Gutov <dgutov <at> yandex.ru>
Cc: 14029-done <at> debbugs.gnu.org
Subject: bug#14029: 24.2.50; [PATCH] imenu problems with special elements
Date: Fri, 29 Nov 2013 14:36:48 +0100
[Message part 1 (text/plain, inline)]
Dmitry Gutov <dgutov <at> yandex.ru> 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.

[imenu.patch (text/x-diff, inline)]
=== 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.
  


This bug report was last modified 11 years and 181 days ago.

Previous Next


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