Mercurial > emacs
comparison lisp/speedbar.el @ 28925:89a795d90175
(speedbar-recenter): Typo, and fix logic.
(speedbar-expand-line): Make arg optional.
(speedbar-mode): Avoid a compiler warning.
author | Eric M. Ludlam <zappo@gnu.org> |
---|---|
date | Mon, 15 May 2000 22:17:24 +0000 |
parents | 5292e9f1f2ca |
children | b37210b05707 |
comparison
equal
deleted
inserted
replaced
28924:7932a964e38f | 28925:89a795d90175 |
---|---|
1271 (speedbar-frame-mode -1))))) | 1271 (speedbar-frame-mode -1))))) |
1272 t t) | 1272 t t) |
1273 (toggle-read-only 1) | 1273 (toggle-read-only 1) |
1274 (speedbar-set-mode-line-format) | 1274 (speedbar-set-mode-line-format) |
1275 (if speedbar-xemacsp | 1275 (if speedbar-xemacsp |
1276 (progn | 1276 (set (make-local-variable 'mouse-motion-handler) |
1277 (make-local-variable 'mouse-motion-handler) | 1277 'speedbar-track-mouse-xemacs) |
1278 (setq mouse-motion-handler 'speedbar-track-mouse-xemacs)) | |
1279 (if speedbar-track-mouse-flag | 1278 (if speedbar-track-mouse-flag |
1280 (progn | 1279 (set (make-local-variable 'track-mouse) t)) ;this could be messy. |
1281 (make-local-variable 'track-mouse) | |
1282 (setq track-mouse t))) ;this could be messy. | |
1283 (setq auto-show-mode nil)) ;no auto-show for Emacs | 1280 (setq auto-show-mode nil)) ;no auto-show for Emacs |
1284 (run-hooks 'speedbar-mode-hook)) | 1281 (run-hooks 'speedbar-mode-hook)) |
1285 (speedbar-update-contents) | 1282 (speedbar-update-contents) |
1286 speedbar-buffer) | 1283 speedbar-buffer) |
1287 | 1284 |
3395 t) | 3392 t) |
3396 (speedbar-do-function-pointer) | 3393 (speedbar-do-function-pointer) |
3397 nil)) | 3394 nil)) |
3398 (speedbar-do-function-pointer))) | 3395 (speedbar-do-function-pointer))) |
3399 | 3396 |
3400 (defun speedbar-expand-line (arg) | 3397 (defun speedbar-expand-line (&optional arg) |
3401 "Expand the line under the cursor. | 3398 "Expand the line under the cursor. |
3402 With universal argument ARG, flush cached data." | 3399 With universal argument ARG, flush cached data." |
3403 (interactive "P") | 3400 (interactive "P") |
3404 (beginning-of-line) | 3401 (beginning-of-line) |
3405 (let ((speedbar-power-click arg)) | 3402 (let ((speedbar-power-click arg)) |
4103 "Recenter the current buffer so POINT is on the top of the window." | 4100 "Recenter the current buffer so POINT is on the top of the window." |
4104 (recenter 1)) | 4101 (recenter 1)) |
4105 | 4102 |
4106 (defun speedbar-recenter () | 4103 (defun speedbar-recenter () |
4107 "Recenter the current buffer so POINT is in the center of the window." | 4104 "Recenter the current buffer so POINT is in the center of the window." |
4108 (recenter (window-hight (/ (selected-window) 2)))) | 4105 (recenter (/ (window-height (selected-window)) 2))) |
4109 | 4106 |
4110 | 4107 |
4111 ;;; Color loading section. | 4108 ;;; Color loading section. |
4112 ;; | 4109 ;; |
4113 (defface speedbar-button-face '((((class color) (background light)) | 4110 (defface speedbar-button-face '((((class color) (background light)) |