"Barry A. Warsaw" <bwarsaw(a)cnri.reston.va.us> writes:
>>>>> "Hrvoje" == Hrvoje Niksic
<hniksic(a)srce.hr> writes:
Hrvoje> "Barry A. Warsaw" <bwarsaw(a)cnri.reston.va.us> writes:
>> I think there's a problem with Imenu when a buffer has no
>> functions in it. (...)
Hrvoje> Does this patch help?
Yes, there's no error now, thanks. But it would be nicer if the
only thing in the menu was the *Rescan* entry.
OK. Scratch the last patch, and apply this one instead:
1998-11-30 Hrvoje Niksic <hniksic(a)srce.hr>
* imenu.el (imenu--create-menu-1): Handle empty menu.
--- xemacs-base/imenu.el.orig Mon Nov 30 20:44:55 1998
+++ xemacs-base/imenu.el Mon Nov 30 21:23:20 1998
@@ -802,7 +802,7 @@
t))))
(defun imenu--create-menu-1 (title list)
- (cons title (mapcar 'imenu--create-menu-2 list)))
+ (cons title (mapcar 'imenu--create-menu-2 (delq nil list))))
(defun imenu--mouse-menu (index-alist event &optional title)
"Let the user select from a buffer index from a mouse menu.