[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Double hyphens in variable names.

From: David PONCE
Subject: Re: Double hyphens in variable names.
Date: Mon, 6 Oct 2003 11:06:51 +0200 (CEST)


>>Is there another "standard" method to force a rescan of the imenu
>>without using `imenu--index-alist'?
> No, not on the lisp level.  There is a user-level way to do this: by
> selecting the *Rescan* item from Imenu's menu.  Setting
> imenu--index-alist to nil might work but it's not documented.  As it
> seems useful for lisp programs to be able to force a rescan, we could
> implement such a feature.  I'll try and see if I can come up with a
> function that does this.

Thanks!  I think a such function will be very useful.  Perhaps it
could just contain the code run when selecting the *Rescan* item?
Something like this:

(defun imenu-refresh ()
  "Refresh the imenu."
  (setq imenu--index-alist nil)

(defun imenu--menubar-select (item)
  "Use Imenu to select the function or variable named in this menu ITEM."
  (if (equal item imenu--rescan-item)
    (imenu item)


reply via email to

[Prev in Thread] Current Thread [Next in Thread]