/[emacs]/emacs/lisp/imenu.el
ViewVC logotype

Diff of /emacs/lisp/imenu.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.87 by monnier, Tue Nov 20 00:17:15 2001 UTC revision 1.88 by rms, Mon Mar 11 09:16:37 2002 UTC
# Line 980  A trivial interface to `imenu-add-to-men Line 980  A trivial interface to `imenu-add-to-men
980    
981  (defvar imenu-buffer-menubar nil)  (defvar imenu-buffer-menubar nil)
982    
983    (defvar imenu-update-menubar-modified-tick 0
984      "The value of (buffer-modified-tick) as of last call to `imenu-update-menubar'.
985    This value becomes local in every buffer when it is set.")
986    (make-variable-buffer-local 'imenu-update-menubar-modified-tick)
987    
988  (defun imenu-update-menubar ()  (defun imenu-update-menubar ()
989    (and (current-local-map)    (and (current-local-map)
990         (keymapp (lookup-key (current-local-map) [menu-bar index]))         (keymapp (lookup-key (current-local-map) [menu-bar index]))
991           (not (eq (buffer-modified-tick)
992                    imenu-update-menubar-modified-tick))
993         (let ((index-alist (imenu--make-index-alist t)))         (let ((index-alist (imenu--make-index-alist t)))
994           ;; Don't bother updating if the index-alist has not changed           ;; Don't bother updating if the index-alist has not changed
995           ;; since the last time we did it.           ;; since the last time we did it.
# Line 996  A trivial interface to `imenu-add-to-men Line 1003  A trivial interface to `imenu-add-to-men
1003                                                     (if (< 1 (length (cdr menu)))                                                     (if (< 1 (length (cdr menu)))
1004                                                         (cdr menu)                                                         (cdr menu)
1005                                                       (cdr (car (cdr menu))))))                                                       (cdr (car (cdr menu))))))
1006                   (setq imenu-update-menubar-modified-tick
1007                         (buffer-modified-tick))
1008                 (setq old (lookup-key (current-local-map) [menu-bar index]))                 (setq old (lookup-key (current-local-map) [menu-bar index]))
1009                 (setcdr old (cdr menu1)))))))                 (setcdr old (cdr menu1)))))))
1010    

Legend:
Removed from v.1.87  
changed lines
  Added in v.1.88

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26