[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/speedbar.el
From: |
Nick Roberts |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/speedbar.el |
Date: |
Fri, 17 Feb 2006 00:26:14 +0000 |
Index: emacs/lisp/speedbar.el
diff -u emacs/lisp/speedbar.el:1.75 emacs/lisp/speedbar.el:1.76
--- emacs/lisp/speedbar.el:1.75 Mon Feb 6 14:33:35 2006
+++ emacs/lisp/speedbar.el Fri Feb 17 00:26:14 2006
@@ -1019,10 +1019,10 @@
(lambda () (let ((speedbar-update-flag t))
(speedbar-timer-fn)))))
-(defmacro speedbar-frame-width ()
+(defsubst speedbar-frame-width ()
"Return the width of the speedbar frame in characters.
nil if it doesn't exist."
- '(window-width (get-buffer-window speedbar-buffer)))
+ (frame-width speedbar-frame))
(defun speedbar-mode ()
"Major mode for managing a display of directories and tags.
@@ -2123,7 +2123,7 @@
"A wrapper for `try-completion'.
Passes STRING and ALIST to `try-completion' if ALIST
passes some tests."
- (if (and (listp alist) (not (null alist))
+ (if (and (consp alist)
(listp (car alist)) (stringp (car (car alist))))
(try-completion string alist)
nil))
@@ -2423,8 +2423,7 @@
;; Choose the correct method of doodling.
(if (and speedbar-mode-specific-contents-flag
- (listp speedbar-special-mode-expansion-list)
- speedbar-special-mode-expansion-list
+ (consp speedbar-special-mode-expansion-list)
(local-variable-p
'speedbar-special-mode-expansion-list
(current-buffer)))
@@ -2463,12 +2462,14 @@
)
(set-buffer speedbar-buffer)
(speedbar-with-writable
- (erase-buffer)
- (dolist (func funclst)
- (setq default-directory cbd)
- (funcall func cbd 0))
- (speedbar-reconfigure-keymaps)
- (goto-char (point-min)))
+ (let* ((window (get-buffer-window speedbar-buffer 0))
+ (p (window-point window)))
+ (erase-buffer)
+ (dolist (func funclst)
+ (setq default-directory cbd)
+ (funcall func cbd 0))
+ (speedbar-reconfigure-keymaps)
+ (set-window-point window p)))
))))
(defun speedbar-update-directory-contents ()
@@ -2572,7 +2573,6 @@
;; We do not erase the buffer because these functions may
;; decide NOT to update themselves.
(funcall func specialbuff)))
-
(goto-char (point-min))))
(speedbar-reconfigure-keymaps))
@@ -2614,8 +2614,7 @@
(speedbar-maybe-add-localized-support (current-buffer))
;; Update for special mode all the time!
(if (and speedbar-mode-specific-contents-flag
- (listp speedbar-special-mode-expansion-list)
- speedbar-special-mode-expansion-list
+ (consp speedbar-special-mode-expansion-list)
(local-variable-p
'speedbar-special-mode-expansion-list
(current-buffer)))