diff options
| author | Richard M. Stallman | 2004-08-22 17:03:42 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 2004-08-22 17:03:42 +0000 |
| commit | 0ed9d54f71d440f4248c83d34ca5b9944f81749c (patch) | |
| tree | a5d2d090654f79d639724ddbe377c148a11ecd11 | |
| parent | 63619f423304d218c1299c85f52a9820528b5707 (diff) | |
| download | emacs-0ed9d54f71d440f4248c83d34ca5b9944f81749c.tar.gz emacs-0ed9d54f71d440f4248c83d34ca5b9944f81749c.zip | |
(speedbar-file-regexp): Definition moved up.
(speedbar-mode, speedbar-set-mode-line-format): Use with-no-warnings.
(speedbar-emacs-popup-kludge): Delete Emacs 19 alternative.
| -rw-r--r-- | lisp/speedbar.el | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/lisp/speedbar.el b/lisp/speedbar.el index 63ff1818b3d..524a6d4f2f8 100644 --- a/lisp/speedbar.el +++ b/lisp/speedbar.el | |||
| @@ -665,6 +665,13 @@ useful, such as version control." | |||
| 665 | "*Regexp matching files we don't want displayed in a speedbar buffer. | 665 | "*Regexp matching files we don't want displayed in a speedbar buffer. |
| 666 | It is generated from the variable `completion-ignored-extensions'") | 666 | It is generated from the variable `completion-ignored-extensions'") |
| 667 | 667 | ||
| 668 | ;; This can't be further down, since it is needed just after. | ||
| 669 | (defvar speedbar-file-regexp | ||
| 670 | (speedbar-extension-list-to-regex speedbar-supported-extension-expressions) | ||
| 671 | "Regular expression matching files we know how to expand. | ||
| 672 | Created from `speedbar-supported-extension-expression' with the | ||
| 673 | function `speedbar-extension-list-to-regex'") | ||
| 674 | |||
| 668 | ;; this is dangerous to customize, because the defaults will probably | 675 | ;; this is dangerous to customize, because the defaults will probably |
| 669 | ;; change in the future. | 676 | ;; change in the future. |
| 670 | (defcustom speedbar-supported-extension-expressions | 677 | (defcustom speedbar-supported-extension-expressions |
| @@ -700,12 +707,6 @@ proportionally to the number of subdirs." | |||
| 700 | :type 'boolean | 707 | :type 'boolean |
| 701 | :version 21.4) | 708 | :version 21.4) |
| 702 | 709 | ||
| 703 | (defvar speedbar-file-regexp | ||
| 704 | (speedbar-extension-list-to-regex speedbar-supported-extension-expressions) | ||
| 705 | "Regular expression matching files we know how to expand. | ||
| 706 | Created from `speedbar-supported-extension-expression' with the | ||
| 707 | function `speedbar-extension-list-to-regex'") | ||
| 708 | |||
| 709 | (defun speedbar-add-supported-extension (extension) | 710 | (defun speedbar-add-supported-extension (extension) |
| 710 | "Add EXTENSION as a new supported extension for speedbar tagging. | 711 | "Add EXTENSION as a new supported extension for speedbar tagging. |
| 711 | This should start with a `.' if it is not a complete file name, and | 712 | This should start with a `.' if it is not a complete file name, and |
| @@ -1295,8 +1296,9 @@ in the selected file. | |||
| 1295 | (toggle-read-only 1) | 1296 | (toggle-read-only 1) |
| 1296 | (speedbar-set-mode-line-format) | 1297 | (speedbar-set-mode-line-format) |
| 1297 | (if speedbar-xemacsp | 1298 | (if speedbar-xemacsp |
| 1298 | (set (make-local-variable 'mouse-motion-handler) | 1299 | (with-no-warnings |
| 1299 | 'speedbar-track-mouse-xemacs) | 1300 | (set (make-local-variable 'mouse-motion-handler) |
| 1301 | 'speedbar-track-mouse-xemacs)) | ||
| 1300 | (if speedbar-track-mouse-flag | 1302 | (if speedbar-track-mouse-flag |
| 1301 | (set (make-local-variable 'track-mouse) t)) ;this could be messy. | 1303 | (set (make-local-variable 'track-mouse) t)) ;this could be messy. |
| 1302 | (setq auto-show-mode nil)) ;no auto-show for Emacs | 1304 | (setq auto-show-mode nil)) ;no auto-show for Emacs |
| @@ -1345,7 +1347,8 @@ This gives visual indications of what is up. It EXPECTS the speedbar | |||
| 1345 | frame and window to be the currently active frame and window." | 1347 | frame and window to be the currently active frame and window." |
| 1346 | (if (and (frame-live-p speedbar-frame) | 1348 | (if (and (frame-live-p speedbar-frame) |
| 1347 | (or (not speedbar-xemacsp) | 1349 | (or (not speedbar-xemacsp) |
| 1348 | (specifier-instance has-modeline-p))) | 1350 | (with-no-warnings |
| 1351 | (specifier-instance has-modeline-p)))) | ||
| 1349 | (save-excursion | 1352 | (save-excursion |
| 1350 | (set-buffer speedbar-buffer) | 1353 | (set-buffer speedbar-buffer) |
| 1351 | (let* ((w (or (speedbar-frame-width) 20)) | 1354 | (let* ((w (or (speedbar-frame-width) 20)) |
| @@ -1546,9 +1549,7 @@ Must be bound to event E." | |||
| 1546 | ;; This gets the cursor where the user can see it. | 1549 | ;; This gets the cursor where the user can see it. |
| 1547 | (if (not (bolp)) (forward-char -1)) | 1550 | (if (not (bolp)) (forward-char -1)) |
| 1548 | (sit-for 0) | 1551 | (sit-for 0) |
| 1549 | (if (< emacs-major-version 20) | 1552 | (mouse-major-mode-menu e nil))) |
| 1550 | (mouse-major-mode-menu e) | ||
| 1551 | (mouse-major-mode-menu e nil)))) | ||
| 1552 | 1553 | ||
| 1553 | (defun speedbar-hack-buffer-menu (e) | 1554 | (defun speedbar-hack-buffer-menu (e) |
| 1554 | "Control mouse 1 is buffer menu. | 1555 | "Control mouse 1 is buffer menu. |