nil t nil 'imenu--history-list name)))
(when (stringp name)
- (setq choice (assoc name prepared-index-alist))
- (if (imenu--subalist-p choice)
- (imenu--completion-buffer (cdr choice) prompt)
- choice))))
+ (or (get-text-property 0 'imenu-choice name)
+ (progn
+ (setq choice (assoc name prepared-index-alist))
+ (if (imenu--subalist-p choice)
+ (imenu--completion-buffer (cdr choice) prompt)
+ choice))))))
(defun imenu--mouse-menu (index-alist event &optional title)
"Let the user select from a buffer index from a mouse menu.
(new-prefix (and concat-names
(if prefix
(concat prefix imenu-level-separator name)
- name))))
+ (if (eq imenu-flatten 'annotation)
+ (propertize name 'imenu-choice item)
+ name)))))
(cond
((not (imenu--subalist-p item))
(list (cons (if (and (eq imenu-flatten 'annotation) prefix)