changeset 72595:c1a0f40d53a7

* imenu.el (imenu-update-menubar): Use buffer-chars-modified-tick.
author Chong Yidong <cyd@stupidchicken.com>
date Fri, 01 Sep 2006 13:30:55 +0000
parents a44697fb94e7
children 03f6ec3cc19d
files lisp/ChangeLog lisp/imenu.el
diffstat 2 files changed, 8 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Fri Sep 01 13:30:05 2006 +0000
+++ b/lisp/ChangeLog	Fri Sep 01 13:30:55 2006 +0000
@@ -1,3 +1,7 @@
+2006-09-01  Chong Yidong  <cyd@stupidchicken.com>
+
+	* imenu.el (imenu-update-menubar): Use buffer-chars-modified-tick.
+
 2006-08-31  Richard Stallman  <rms@gnu.org>
 
 	* cus-edit.el (custom-save-variables): Slight cleanup.
--- a/lisp/imenu.el	Fri Sep 01 13:30:05 2006 +0000
+++ b/lisp/imenu.el	Fri Sep 01 13:30:55 2006 +0000
@@ -967,15 +967,15 @@
 (defvar imenu-buffer-menubar nil)
 
 (defvar imenu-menubar-modified-tick 0
-  "The value of (buffer-modified-tick) as of last call to `imenu-update-menubar'.")
+  "The value of (buffer-chars-modified-tick) as of the last call
+to `imenu-update-menubar'.")
 (make-variable-buffer-local 'imenu-menubar-modified-tick)
 
 (defun imenu-update-menubar ()
   (when (and (current-local-map)
 	     (keymapp (lookup-key (current-local-map) [menu-bar index]))
-	     (not (eq (buffer-modified-tick)
-		      imenu-menubar-modified-tick)))
-    (setq imenu-menubar-modified-tick (buffer-modified-tick))
+	     (/= (buffer-chars-modified-tick) imenu-menubar-modified-tick))
+    (setq imenu-menubar-modified-tick (buffer-chars-modified-tick))
     (let ((index-alist (imenu--make-index-alist t)))
       ;; Don't bother updating if the index-alist has not changed
       ;; since the last time we did it.