all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Andreas Politz <politza@hochschule-trier.de>
To: Dmitry Gutov <dgutov@yandex.ru>
Cc: 14029-done@debbugs.gnu.org
Subject: bug#14029: 24.2.50; [PATCH] imenu problems with special elements
Date: Fri, 29 Nov 2013 14:36:48 +0100	[thread overview]
Message-ID: <87pppj2utr.fsf@hochschule-trier.de> (raw)
In-Reply-To: <52980D7D.2060902@yandex.ru> (Dmitry Gutov's message of "Fri, 29 Nov 2013 05:43:57 +0200")

[-- Attachment #1: Type: text/plain, Size: 831 bytes --]

Dmitry Gutov <dgutov@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.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: imenu.patch --]
[-- Type: text/x-diff, Size: 701 bytes --]

=== 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.
  


  reply	other threads:[~2013-11-29 13:36 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-22  1:24 bug#14029: 24.2.50; [PATCH] imenu problems with special elements Andreas Politz
2013-03-22  5:12 ` Drew Adams
     [not found]   ` <87ip4iwfoe.fsf@fh-trier.de>
2013-03-23 15:54     ` Andreas Politz
2013-03-23 16:15       ` Drew Adams
2013-11-24 23:53       ` Dmitry Gutov
2013-11-25  1:32         ` Andreas Politz
2013-11-29  3:43           ` Dmitry Gutov
2013-11-29 13:36             ` Andreas Politz [this message]
2013-11-29 14:35               ` Dmitry Gutov
2013-11-29 15:34               ` Drew Adams
2013-11-25  1:32         ` Andreas Politz
2013-11-25  1:40           ` Andreas Politz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87pppj2utr.fsf@hochschule-trier.de \
    --to=politza@hochschule-trier.de \
    --cc=14029-done@debbugs.gnu.org \
    --cc=dgutov@yandex.ru \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.