diff options
| author | Eric M. Ludlam | 2001-02-12 16:33:03 +0000 |
|---|---|---|
| committer | Eric M. Ludlam | 2001-02-12 16:33:03 +0000 |
| commit | 68514d48aa7a9b75b0cde8072379845669c5bb02 (patch) | |
| tree | 4be4caba7f8df2e29aa670e51823d8a09a441eee | |
| parent | 60222d69c6d0c46532c9f1f7824f2c7c992da39e (diff) | |
| download | emacs-68514d48aa7a9b75b0cde8072379845669c5bb02.tar.gz emacs-68514d48aa7a9b75b0cde8072379845669c5bb02.zip | |
(speedbar-frame-parameters): No toolbar lines.
(speedbar-line-file): Return nil if not a file.
(speedbar-buffers-line-path): Return file for tags, and dir for files.
| -rw-r--r-- | lisp/ChangeLog | 6 | ||||
| -rw-r--r-- | lisp/speedbar.el | 30 |
2 files changed, 26 insertions, 10 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 87eb632dbdc..bcfa6aaa26c 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,9 @@ | |||
| 1 | 2001-02-12 Eric M. Ludlam <zappo@choochoo.ultranet.com> | ||
| 2 | |||
| 3 | * speedbar.el (speedbar-frame-parameters): No toolbar lines. | ||
| 4 | (speedbar-line-file): Return nil if not a file. | ||
| 5 | (speedbar-buffers-line-path): Return file for tags, and dir for files. | ||
| 6 | |||
| 1 | 2001-02-12 Michael Kifer <kifer@cs.sunysb.edu> | 7 | 2001-02-12 Michael Kifer <kifer@cs.sunysb.edu> |
| 2 | 8 | ||
| 3 | * ediff-diff.el (ediff-make-diff2-buffer): Removed bogus checks | 9 | * ediff-diff.el (ediff-make-diff2-buffer): Removed bogus checks |
diff --git a/lisp/speedbar.el b/lisp/speedbar.el index f60f7030ebc..97e2a582f48 100644 --- a/lisp/speedbar.el +++ b/lisp/speedbar.el | |||
| @@ -1,9 +1,9 @@ | |||
| 1 | ;;; speedbar --- quick access to files and tags in a frame | 1 | ;;; speedbar --- quick access to files and tags in a frame |
| 2 | 2 | ||
| 3 | ;;; Copyright (C) 1996, 97, 98, 99, 00 Free Software Foundation | 3 | ;;; Copyright (C) 1996, 97, 98, 99, 2000, 01 Free Software Foundation |
| 4 | 4 | ||
| 5 | ;; Author: Eric M. Ludlam <zappo@gnu.org> | 5 | ;; Author: Eric M. Ludlam <zappo@gnu.org> |
| 6 | ;; Version: 0.11 | 6 | ;; Version: 0.11a |
| 7 | ;; Keywords: file, tags, tools | 7 | ;; Keywords: file, tags, tools |
| 8 | 8 | ||
| 9 | ;; This file is part of GNU Emacs. | 9 | ;; This file is part of GNU Emacs. |
| @@ -347,6 +347,7 @@ between different directories." | |||
| 347 | (width . 20) | 347 | (width . 20) |
| 348 | (border-width . 0) | 348 | (border-width . 0) |
| 349 | (menu-bar-lines . 0) | 349 | (menu-bar-lines . 0) |
| 350 | (tool-bar-lines . 0) | ||
| 350 | (unsplittable . t)) | 351 | (unsplittable . t)) |
| 351 | "*Parameters to use when creating the speedbar frame in Emacs. | 352 | "*Parameters to use when creating the speedbar frame in Emacs. |
| 352 | Any parameter supported by a frame may be added. The parameter `height' | 353 | Any parameter supported by a frame may be added. The parameter `height' |
| @@ -3294,7 +3295,9 @@ directory, then it is the directory name." | |||
| 3294 | (if f | 3295 | (if f |
| 3295 | (let* ((depth (string-to-int (match-string 1))) | 3296 | (let* ((depth (string-to-int (match-string 1))) |
| 3296 | (path (speedbar-line-path depth))) | 3297 | (path (speedbar-line-path depth))) |
| 3297 | (concat path f)) | 3298 | (if (file-exists-p (concat path f)) |
| 3299 | (concat path f) | ||
| 3300 | nil)) | ||
| 3298 | nil)))) | 3301 | nil)))) |
| 3299 | 3302 | ||
| 3300 | (defun speedbar-goto-this-file (file) | 3303 | (defun speedbar-goto-this-file (file) |
| @@ -4030,13 +4033,20 @@ If TEMP is non-nil, then clicking on a buffer restores the previous display." | |||
| 4030 | (defun speedbar-buffers-line-path (&optional depth) | 4033 | (defun speedbar-buffers-line-path (&optional depth) |
| 4031 | "Fetch the full path to the file (buffer) specified on the current line. | 4034 | "Fetch the full path to the file (buffer) specified on the current line. |
| 4032 | Optional argument DEPTH specifies the current depth of the back search." | 4035 | Optional argument DEPTH specifies the current depth of the back search." |
| 4033 | (end-of-line) | 4036 | (save-excursion |
| 4034 | ;; Buffers are always at level 0 | 4037 | (end-of-line) |
| 4035 | (if (not (re-search-backward "^0:" nil t)) | 4038 | (let ((start (point))) |
| 4036 | nil | 4039 | ;; Buffers are always at level 0 |
| 4037 | (let* ((bn (speedbar-line-text)) | 4040 | (if (not (re-search-backward "^0:" nil t)) |
| 4038 | (buffer (if bn (get-buffer bn)))) | 4041 | nil |
| 4039 | (if buffer (file-name-directory (buffer-file-name buffer)))))) | 4042 | (let* ((bn (speedbar-line-text)) |
| 4043 | (buffer (if bn (get-buffer bn)))) | ||
| 4044 | (if buffer | ||
| 4045 | (if (save-excursion | ||
| 4046 | (end-of-line) | ||
| 4047 | (eq start (point))) | ||
| 4048 | (file-name-directory (buffer-file-name buffer)) | ||
| 4049 | (buffer-file-name buffer)))))))) | ||
| 4040 | 4050 | ||
| 4041 | (defun speedbar-buffer-click (text token indent) | 4051 | (defun speedbar-buffer-click (text token indent) |
| 4042 | "When the users clicks on a buffer-button in speedbar. | 4052 | "When the users clicks on a buffer-button in speedbar. |