changeset 70504:f30d66ed3e9a

(speedbar-timer-fn): Remove save-window-excursion. Update localized contents for all buffers except ignored modes.
author Nick Roberts <nickrob@snap.net.nz>
date Sun, 07 May 2006 12:09:42 +0000
parents f403849ca1a6
children 53adfd470fe4
files lisp/speedbar.el
diffstat 1 files changed, 4 insertions(+), 13 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/speedbar.el	Sun May 07 12:08:23 2006 +0000
+++ b/lisp/speedbar.el	Sun May 07 12:09:42 2006 +0000
@@ -2529,8 +2529,7 @@
 				  default-directory)
 		(speedbar-message nil))))
       ;; Else, we can do a short cut.  No text cache.
-      (let ((cbd (expand-file-name default-directory))
-	    )
+      (let ((cbd (expand-file-name default-directory)))
 	(set-buffer speedbar-buffer)
 	(speedbar-with-writable
 	  (let* ((window (get-buffer-window speedbar-buffer 0))
@@ -2542,8 +2541,7 @@
 	      (funcall func cbd 0))
 	    (speedbar-reconfigure-keymaps)
 	    (set-window-point window p)
-	    (set-window-start window start)))
-	))))
+	    (set-window-start window start)))))))
 
 (defun speedbar-update-directory-contents ()
   "Update the contents of the speedbar buffer based on the current directory."
@@ -2677,7 +2675,6 @@
 	       (frame-visible-p (speedbar-current-frame))
 	       (not (eq (frame-visible-p (speedbar-current-frame)) 'icon)))
 	  (let ((af (selected-frame)))
-	    (save-window-excursion
 	      (dframe-select-attached-frame speedbar-frame)
 	      ;; make sure we at least choose a window to
 	      ;; get a good directory from
@@ -2704,14 +2701,8 @@
 			     "Updating speedbar to special mode: %s...done"
 			     major-mode)
 			    (speedbar-message nil))))
-		  ;; Update all the contents if directories change!
-		  (if (or (member major-mode speedbar-ignored-modes)
-			  (eq af (speedbar-current-frame))
-			  (not (buffer-file-name)))
-		      nil
-		    (speedbar-update-localized-contents)
-		    ))
-		(select-frame af)))
+		    (speedbar-update-localized-contents))
+		(select-frame af))
 	    ;; Now run stealthy updates of time-consuming items
 	    (speedbar-stealthy-updates)))))
   (run-hooks 'speedbar-timer-hook))