Mercurial > emacs
changeset 56762:85c0c238dbbf
(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.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Sun, 22 Aug 2004 17:03:42 +0000 |
parents | 486136b7f89c |
children | e9a8ab6f16fc |
files | lisp/speedbar.el |
diffstat | 1 files changed, 13 insertions(+), 12 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/speedbar.el Sun Aug 22 16:59:57 2004 +0000 +++ b/lisp/speedbar.el Sun Aug 22 17:03:42 2004 +0000 @@ -665,6 +665,13 @@ "*Regexp matching files we don't want displayed in a speedbar buffer. It is generated from the variable `completion-ignored-extensions'") +;; This can't be further down, since it is needed just after. +(defvar speedbar-file-regexp + (speedbar-extension-list-to-regex speedbar-supported-extension-expressions) + "Regular expression matching files we know how to expand. +Created from `speedbar-supported-extension-expression' with the +function `speedbar-extension-list-to-regex'") + ;; this is dangerous to customize, because the defaults will probably ;; change in the future. (defcustom speedbar-supported-extension-expressions @@ -700,12 +707,6 @@ :type 'boolean :version 21.4) -(defvar speedbar-file-regexp - (speedbar-extension-list-to-regex speedbar-supported-extension-expressions) - "Regular expression matching files we know how to expand. -Created from `speedbar-supported-extension-expression' with the -function `speedbar-extension-list-to-regex'") - (defun speedbar-add-supported-extension (extension) "Add EXTENSION as a new supported extension for speedbar tagging. This should start with a `.' if it is not a complete file name, and @@ -1295,8 +1296,9 @@ (toggle-read-only 1) (speedbar-set-mode-line-format) (if speedbar-xemacsp - (set (make-local-variable 'mouse-motion-handler) - 'speedbar-track-mouse-xemacs) + (with-no-warnings + (set (make-local-variable 'mouse-motion-handler) + 'speedbar-track-mouse-xemacs)) (if speedbar-track-mouse-flag (set (make-local-variable 'track-mouse) t)) ;this could be messy. (setq auto-show-mode nil)) ;no auto-show for Emacs @@ -1345,7 +1347,8 @@ frame and window to be the currently active frame and window." (if (and (frame-live-p speedbar-frame) (or (not speedbar-xemacsp) - (specifier-instance has-modeline-p))) + (with-no-warnings + (specifier-instance has-modeline-p)))) (save-excursion (set-buffer speedbar-buffer) (let* ((w (or (speedbar-frame-width) 20)) @@ -1546,9 +1549,7 @@ ;; This gets the cursor where the user can see it. (if (not (bolp)) (forward-char -1)) (sit-for 0) - (if (< emacs-major-version 20) - (mouse-major-mode-menu e) - (mouse-major-mode-menu e nil)))) + (mouse-major-mode-menu e nil))) (defun speedbar-hack-buffer-menu (e) "Control mouse 1 is buffer menu.