Mercurial > emacs
comparison lisp/imenu.el @ 55826:e7bdb5b77df2
(imenu--menubar-select): Set imenu-menubar-modified-tick
and imenu--last-menubar-index-alist.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Sat, 29 May 2004 14:35:20 +0000 |
parents | 9cb896b7b7e2 |
children | 7e0e6be19969 4c90ffeb71c5 |
comparison
equal
deleted
inserted
replaced
55825:1709fc8089c9 | 55826:e7bdb5b77df2 |
---|---|
888 (if (not imenu-eager-completion-buffer) | 888 (if (not imenu-eager-completion-buffer) |
889 (add-hook 'minibuffer-setup-hook 'minibuffer-completion-help)) | 889 (add-hook 'minibuffer-setup-hook 'minibuffer-completion-help)) |
890 (setq name (completing-read prompt | 890 (setq name (completing-read prompt |
891 prepared-index-alist | 891 prepared-index-alist |
892 nil t nil 'imenu--history-list name))) | 892 nil t nil 'imenu--history-list name))) |
893 | |
893 (cond ((not (stringp name)) nil) | 894 (cond ((not (stringp name)) nil) |
894 ((string= name (car imenu--rescan-item)) t) | 895 ((string= name (car imenu--rescan-item)) t) |
895 (t | 896 (t |
896 (setq choice (assoc name prepared-index-alist)) | 897 (setq choice (assoc name prepared-index-alist)) |
897 (if (imenu--subalist-p choice) | 898 (if (imenu--subalist-p choice) |
1013 (defun imenu--menubar-select (item) | 1014 (defun imenu--menubar-select (item) |
1014 "Use Imenu to select the function or variable named in this menu ITEM." | 1015 "Use Imenu to select the function or variable named in this menu ITEM." |
1015 (if (equal item imenu--rescan-item) | 1016 (if (equal item imenu--rescan-item) |
1016 (progn | 1017 (progn |
1017 (imenu--cleanup) | 1018 (imenu--cleanup) |
1019 ;; Make sure imenu-update-menubar redoes everything. | |
1020 (setq imenu-menubar-modified-tick -1) | |
1018 (setq imenu--index-alist nil) | 1021 (setq imenu--index-alist nil) |
1022 (setq imenu--last-menubar-index-alist nil) | |
1019 (imenu-update-menubar) | 1023 (imenu-update-menubar) |
1020 t) | 1024 t) |
1021 (imenu item) | 1025 (imenu item) |
1022 nil)) | 1026 nil)) |
1023 | 1027 |