;;; speedbar.el --- quick access to files and tags in a frame
-;;; Copyright (C) 1996, 97, 98, 99, 2000, 01 Free Software Foundation
+;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
+;; 2004, 2005 Free Software Foundation, Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
;; Version: 0.11a
;; You should have received a copy of the GNU General Public License
;; along with GNU Emacs; see the file COPYING. If not, write to the
-;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-;; Boston, MA 02111-1307, USA.
+;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
;;; Commentary:
;;
;; - More functions to create buttons and options
;; - Timeout directories we haven't visited in a while.
+;;; Code:
+
(require 'assoc)
(require 'easymenu)
:prefix "speedbar-"
:group 'speedbar)
-;;; Code:
(defvar speedbar-initial-expansion-mode-alist
'(("buffers" speedbar-buffer-easymenu-definition speedbar-buffers-key-map
speedbar-buffer-buttons)
will be initialized to the height of the frame speedbar is
attached to and added to this list before the new frame is initialized."
:group 'speedbar
- :type '(repeat (sexp :tag "Parameter:")))
+ :type '(repeat (cons :format "%v"
+ (symbol :tag "Parameter")
+ (sexp :tag "Value"))))
;; These values by Hrvoje Niksic <hniksic@srce.hr>
(defcustom speedbar-frame-plist
(symbol :tag "Property")
(sexp :tag "Value"))))
-(defcustom speedbar-use-imenu-flag (stringp (locate-library "imenu"))
+(defcustom speedbar-use-imenu-flag (fboundp 'imenu)
"*Non-nil means use imenu for file parsing. nil to use etags.
XEmacs prior to 20.4 doesn't support imenu, therefore the default is to
use etags instead. Etags support is not as robust as imenu support."
"*Regexp matching files we don't want displayed in a speedbar buffer.
It is generated from the variable `completion-ignored-extensions'")
-;; Ugly compiler silencing trick. The real defvar comes later in this file.
+;; Compiler silencing trick. The real defvar comes later in this file.
(defvar speedbar-file-regexp)
;; this is dangerous to customize, because the defaults will probably
proportionally to the number of subdirs."
:group 'speedbar
:type 'boolean
- :version 21.4)
+ :version 22.1)
(defun speedbar-add-supported-extension (extension)
"Add EXTENSION as a new supported extension for speedbar tagging.
(display-graphic-p)
window-system))
"*Non-nil means to automatically update the display.
-When this is nil then speedbar will not follow the attached frame's path.
-When speedbar is active, use:
-
-\\<speedbar-key-map> `\\[speedbar-toggle-updates]'
-
+When this is nil then speedbar will not follow the attached
+frame's path. Type \
+\\<speedbar-key-map>\\[speedbar-toggle-updates] in the speedbar \
to toggle this value.")
(defvar speedbar-syntax-table nil
(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
- (run-hooks 'speedbar-mode-hook))
+ (run-mode-hooks 'speedbar-mode-hook))
(speedbar-update-contents)
speedbar-buffer)
(if (equal (car pos) speedbar-frame)
(save-excursion
(save-window-excursion
- (apply 'set-mouse-position pos)
+ (apply 'set-mouse-position (list (car pos) (cadr pos) (cddr pos)))
(speedbar-item-info))))))
(defun speedbar-set-mode-line-format ()
nil
-(eval-when-compile (if (locate-library "imenu") (require 'imenu)))
+(eval-when-compile (condition-case nil (require 'imenu) (error nil)))
(defun speedbar-fetch-dynamic-imenu (file)
"Load FILE into a buffer, and generate tags using Imenu.
;; run load-time hooks
(run-hooks 'speedbar-load-hook)
-;;; arch-tag: 4477e6d1-f78c-48b9-a503-387d3c9767d5
+;; arch-tag: 4477e6d1-f78c-48b9-a503-387d3c9767d5
;;; speedbar.el ends here