]> code.delx.au - gnu-emacs/blobdiff - lisp/speedbar.el
(eshell-windows-shell-file): Look for command.com, not command.exe.
[gnu-emacs] / lisp / speedbar.el
index 1a222e6004e430a14fdd30f39528e244d0e14d0a..12d25ed7ee0f1a3b649fff731bf183405e636342 100644 (file)
@@ -1,6 +1,7 @@
 ;;; 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
@@ -20,8 +21,8 @@
 
 ;; 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)
@@ -354,7 +356,9 @@ Any parameter supported by a frame may be added.  The parameter `height'
 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
@@ -371,7 +375,7 @@ is attached to."
                        (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."
@@ -665,7 +669,7 @@ useful, such as version control."
   "*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
@@ -707,7 +711,7 @@ incurs extra I/O, hence it slows down directory display
 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.
@@ -757,11 +761,9 @@ PATH-EXPRESSION to `speedbar-ignored-path-expressions'."
                                  (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
@@ -1304,7 +1306,7 @@ in the selected file.
       (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)
 
@@ -1340,7 +1342,7 @@ Optional EVENT is currently not used."
     (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 ()
@@ -3747,7 +3749,7 @@ functions to do caching and flushing if appropriate."
 
     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.
@@ -4357,5 +4359,5 @@ If we have an image associated with it, use that image."
 ;; 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