diff options
| author | Juanma Barranquero | 2008-04-23 04:46:10 +0000 |
|---|---|---|
| committer | Juanma Barranquero | 2008-04-23 04:46:10 +0000 |
| commit | c5d69a9713864d90323232372c27c12626cd42e6 (patch) | |
| tree | 7006ff5638b63e7efb415d573f21350f6d0cd88e | |
| parent | c8149699a2a785e661170eb347a90328ff63a621 (diff) | |
| download | emacs-c5d69a9713864d90323232372c27c12626cd42e6.tar.gz emacs-c5d69a9713864d90323232372c27c12626cd42e6.zip | |
(speedbar-use-tool-tips-flag, speedbar-ignored-directory-regexp,
speedbar-file-unshown-regexp, speedbar-file-regexp, speedbar-message,
speedbar-item-info, speedbar-files-item-info,
speedbar-maybe-add-localized-support, speedbar-insert-files-at-point,
speedbar-dynamic-tags-function-list, speedbar-generic-list-positioned-group-p,
speedbar-insert-generic-list, speedbar-fetch-replacement-function,
speedbar-extract-one-symbol, speedbar-separator-face): Fix typos in docstrings.
(speedbar-stealthy-function-list, speedbar-verbosity-level)
(speedbar-supported-extension-expressions, speedbar-update-current-file)
(speedbar-add-indicator, speedbar-tag-expand): Reflow docstring.
(speedbar-use-imenu-flag, speedbar-ignored-directory-expressions)
(speedbar-directory-unshown-regexp, speedbar-handle-delete-frame)
(speedbar-show-info-under-mouse, speedbar-directory-buttons)
(speedbar-check-vc-this-line, speedbar-files-line-directory)
(speedbar-buffer-buttons, speedbar-buffer-buttons-temp)
(speedbar-buffers-line-directory, speedbar-recenter-to-top)
(speedbar-recenter): Doc fixes.
(speedbar-update-speed, speedbar-navigating-speed): Add obsolescence
declaration and remove redundant info in docstring.
| -rw-r--r-- | lisp/speedbar.el | 109 |
1 files changed, 55 insertions, 54 deletions
diff --git a/lisp/speedbar.el b/lisp/speedbar.el index 8584dc55991..225099b5c1e 100644 --- a/lisp/speedbar.el +++ b/lisp/speedbar.el | |||
| @@ -220,10 +220,10 @@ This list is of the form: | |||
| 220 | where NAME is the name of the major display mode these functions are | 220 | where NAME is the name of the major display mode these functions are |
| 221 | for, and the remaining elements FUNCTION are functions to call in order. | 221 | for, and the remaining elements FUNCTION are functions to call in order. |
| 222 | Each function must return nil if interrupted, or t if completed. | 222 | Each function must return nil if interrupted, or t if completed. |
| 223 | Stealthy functions which have a single operation should always return | 223 | Stealthy functions which have a single operation should always return t. |
| 224 | t. Functions which take a long time should maintain a state (where | 224 | Functions which take a long time should maintain a state (where they |
| 225 | they are in their speedbar related calculations) and permit | 225 | are in their speedbar related calculations) and permit interruption. |
| 226 | interruption. See `speedbar-check-vc' as a good example.") | 226 | See `speedbar-check-vc' as a good example.") |
| 227 | 227 | ||
| 228 | (defvar speedbar-mode-functions-list | 228 | (defvar speedbar-mode-functions-list |
| 229 | '(("files" (speedbar-item-info . speedbar-files-item-info) | 229 | '(("files" (speedbar-item-info . speedbar-files-item-info) |
| @@ -325,11 +325,15 @@ A nil value means don't show the file in the list." | |||
| 325 | ;; When I moved to a repeating timer, I had the horrible missfortune | 325 | ;; When I moved to a repeating timer, I had the horrible missfortune |
| 326 | ;; of loosing the ability for adaptive speed choice. This update | 326 | ;; of loosing the ability for adaptive speed choice. This update |
| 327 | ;; speed currently causes long delays when it should have been turned off. | 327 | ;; speed currently causes long delays when it should have been turned off. |
| 328 | (defvar speedbar-update-speed dframe-update-speed | 328 | (defvar speedbar-update-speed dframe-update-speed) |
| 329 | "*Obsoleted variable. Use `dframe-update-speed'.") | 329 | (make-obsolete-variable 'speedbar-update-speed |
| 330 | 330 | 'dframe-update-speed | |
| 331 | (defvar speedbar-navigating-speed dframe-update-speed | 331 | "speedbar 1.0pre3") |
| 332 | "*Obsoleted variable. Use `dframe-update-speed'.") | 332 | |
| 333 | (defvar speedbar-navigating-speed dframe-update-speed) | ||
| 334 | (make-obsolete-variable 'speedbar-navigating-speed | ||
| 335 | 'dframe-update-speed | ||
| 336 | "speedbar 1.0pre3") | ||
| 333 | ;;; END REMOVE THESE | 337 | ;;; END REMOVE THESE |
| 334 | 338 | ||
| 335 | (defcustom speedbar-frame-parameters '((minibuffer . nil) | 339 | (defcustom speedbar-frame-parameters '((minibuffer . nil) |
| @@ -367,7 +371,7 @@ is attached to." | |||
| 367 | (sexp :tag "Value")))) | 371 | (sexp :tag "Value")))) |
| 368 | 372 | ||
| 369 | (defcustom speedbar-use-imenu-flag (fboundp 'imenu) | 373 | (defcustom speedbar-use-imenu-flag (fboundp 'imenu) |
| 370 | "*Non-nil means use imenu for file parsing. nil to use etags. | 374 | "*Non-nil means use imenu for file parsing, nil to use etags. |
| 371 | XEmacs prior to 20.4 doesn't support imenu, therefore the default is to | 375 | XEmacs prior to 20.4 doesn't support imenu, therefore the default is to |
| 372 | use etags instead. Etags support is not as robust as imenu support." | 376 | use etags instead. Etags support is not as robust as imenu support." |
| 373 | :tag "Use Imenu for tags" | 377 | :tag "Use Imenu for tags" |
| @@ -378,7 +382,7 @@ use etags instead. Etags support is not as robust as imenu support." | |||
| 378 | '((speedbar-fetch-dynamic-imenu . speedbar-insert-imenu-list) | 382 | '((speedbar-fetch-dynamic-imenu . speedbar-insert-imenu-list) |
| 379 | (speedbar-fetch-dynamic-etags . speedbar-insert-etags-list)) | 383 | (speedbar-fetch-dynamic-etags . speedbar-insert-etags-list)) |
| 380 | "Set to a list of functions which will return and insert a list of tags. | 384 | "Set to a list of functions which will return and insert a list of tags. |
| 381 | Each element is of the form ( FETCH . INSERT ) where FETCH | 385 | Each element is of the form ( FETCH . INSERT ) where FETCH |
| 382 | is a function which takes one parameter (the file to tag) and returns a | 386 | is a function which takes one parameter (the file to tag) and returns a |
| 383 | list of tags. The tag list can be of any form as long as the | 387 | list of tags. The tag list can be of any form as long as the |
| 384 | corresponding insert method can handle it. If it returns t, then an | 388 | corresponding insert method can handle it. If it returns t, then an |
| @@ -387,7 +391,7 @@ INSERT is a function which takes an INDENTation level, and a LIST of | |||
| 387 | tags to insert. It will then create the speedbar buttons.") | 391 | tags to insert. It will then create the speedbar buttons.") |
| 388 | 392 | ||
| 389 | (defcustom speedbar-use-tool-tips-flag (fboundp 'tooltip-mode) | 393 | (defcustom speedbar-use-tool-tips-flag (fboundp 'tooltip-mode) |
| 390 | "Non-nil means to use tool tips if they are avaialble. | 394 | "Non-nil means to use tool tips if they are available. |
| 391 | When tooltips are not available, mouse-tracking and minibuffer | 395 | When tooltips are not available, mouse-tracking and minibuffer |
| 392 | display is used instead." | 396 | display is used instead." |
| 393 | :group 'speedbar | 397 | :group 'speedbar |
| @@ -522,9 +526,10 @@ hierarchy would be replaced with the new directory." | |||
| 522 | :type 'hook) | 526 | :type 'hook) |
| 523 | 527 | ||
| 524 | (defcustom speedbar-verbosity-level 1 | 528 | (defcustom speedbar-verbosity-level 1 |
| 525 | "*Verbosity level of the speedbar. 0 means say nothing. | 529 | "*Verbosity level of the speedbar. |
| 526 | 1 means medium level verbosity. 2 and higher are higher levels of | 530 | 0 means say nothing. |
| 527 | verbosity." | 531 | 1 means medium level verbosity. |
| 532 | 2 and higher are higher levels of verbosity." | ||
| 528 | :group 'speedbar | 533 | :group 'speedbar |
| 529 | :type 'integer) | 534 | :type 'integer) |
| 530 | 535 | ||
| @@ -635,9 +640,9 @@ with `.' followed by extensions, followed by full-filenames." | |||
| 635 | "\\)$"))) | 640 | "\\)$"))) |
| 636 | 641 | ||
| 637 | (defvar speedbar-ignored-directory-regexp nil | 642 | (defvar speedbar-ignored-directory-regexp nil |
| 638 | "Regular expression matching directorys speedbar will not switch to. | 643 | "Regular expression matching directories speedbar will not switch to. |
| 639 | Created from `speedbar-ignored-directory-expressions' with the function | 644 | Created from `speedbar-ignored-directory-expressions' with the function |
| 640 | `speedbar-extension-list-to-regex' (A misnamed function in this case.) | 645 | `speedbar-extension-list-to-regex' (a misnamed function in this case.) |
| 641 | Use the function `speedbar-add-ignored-directory-regexp', or customize the | 646 | Use the function `speedbar-add-ignored-directory-regexp', or customize the |
| 642 | variable `speedbar-ignored-directory-expressions' to modify this variable.") | 647 | variable `speedbar-ignored-directory-expressions' to modify this variable.") |
| 643 | 648 | ||
| @@ -647,8 +652,8 @@ variable `speedbar-ignored-directory-expressions' to modify this variable.") | |||
| 647 | (defcustom speedbar-ignored-directory-expressions | 652 | (defcustom speedbar-ignored-directory-expressions |
| 648 | '("[/\\]logs?[/\\]\\'") | 653 | '("[/\\]logs?[/\\]\\'") |
| 649 | "*List of regular expressions matching directories speedbar will ignore. | 654 | "*List of regular expressions matching directories speedbar will ignore. |
| 650 | They should included directorys to directories which are notoriously very | 655 | They should included directories which are notoriously very large |
| 651 | large and take a long time to load in. Use the function | 656 | and take a long time to load in. Use the function |
| 652 | `speedbar-add-ignored-directory-regexp' to add new items to this list after | 657 | `speedbar-add-ignored-directory-regexp' to add new items to this list after |
| 653 | speedbar is loaded. You may place anything you like in this list | 658 | speedbar is loaded. You may place anything you like in this list |
| 654 | before speedbar has been loaded." | 659 | before speedbar has been loaded." |
| @@ -662,8 +667,8 @@ before speedbar has been loaded." | |||
| 662 | (defcustom speedbar-directory-unshown-regexp "^\\(\\..*\\)\\'" | 667 | (defcustom speedbar-directory-unshown-regexp "^\\(\\..*\\)\\'" |
| 663 | "*Regular expression matching directories not to show in speedbar. | 668 | "*Regular expression matching directories not to show in speedbar. |
| 664 | They should include commonly existing directories which are not | 669 | They should include commonly existing directories which are not |
| 665 | useful. It is no longer necessary to include include version-control | 670 | useful. It is no longer necessary to include version-control |
| 666 | directories here; see \\[vc-directory-exclusion-list\\]." | 671 | directories here; see `vc-directory-exclusion-list'." |
| 667 | :group 'speedbar | 672 | :group 'speedbar |
| 668 | :type 'string) | 673 | :type 'string) |
| 669 | 674 | ||
| @@ -676,12 +681,12 @@ directories here; see \\[vc-directory-exclusion-list\\]." | |||
| 676 | ;; backup refdir lockfile | 681 | ;; backup refdir lockfile |
| 677 | (concat nstr "\\|#[^#]+#$\\|\\.\\.?\\'\\|\\.#")) | 682 | (concat nstr "\\|#[^#]+#$\\|\\.\\.?\\'\\|\\.#")) |
| 678 | "*Regexp matching files we don't want displayed in a speedbar buffer. | 683 | "*Regexp matching files we don't want displayed in a speedbar buffer. |
| 679 | It is generated from the variable `completion-ignored-extensions'") | 684 | It is generated from the variable `completion-ignored-extensions'.") |
| 680 | 685 | ||
| 681 | (defvar speedbar-file-regexp nil | 686 | (defvar speedbar-file-regexp nil |
| 682 | "Regular expression matching files we know how to expand. | 687 | "Regular expression matching files we know how to expand. |
| 683 | Created from `speedbar-supported-extension-expressions' with the | 688 | Created from `speedbar-supported-extension-expressions' with the |
| 684 | function `speedbar-extension-list-to-regex'") | 689 | function `speedbar-extension-list-to-regex'.") |
| 685 | 690 | ||
| 686 | ;; this is dangerous to customize, because the defaults will probably | 691 | ;; this is dangerous to customize, because the defaults will probably |
| 687 | ;; change in the future. | 692 | ;; change in the future. |
| @@ -700,8 +705,7 @@ will be stripped by a simplified optimizer when compiled into a | |||
| 700 | singular expression. This variable will be turned into | 705 | singular expression. This variable will be turned into |
| 701 | `speedbar-file-regexp' for use with speedbar. You should use the | 706 | `speedbar-file-regexp' for use with speedbar. You should use the |
| 702 | function `speedbar-add-supported-extension' to add a new extension at | 707 | function `speedbar-add-supported-extension' to add a new extension at |
| 703 | runtime, or use the configuration dialog to set it in your .emacs | 708 | runtime, or use the configuration dialog to set it in your .emacs file. |
| 704 | file. | ||
| 705 | If you add an extension to this list, and it does not appear, you may | 709 | If you add an extension to this list, and it does not appear, you may |
| 706 | need to also modify `completion-ignored-extension' which will also help | 710 | need to also modify `completion-ignored-extension' which will also help |
| 707 | file completion." | 711 | file completion." |
| @@ -1054,7 +1058,7 @@ supported at a time. | |||
| 1054 | 1058 | ||
| 1055 | (defun speedbar-handle-delete-frame (e) | 1059 | (defun speedbar-handle-delete-frame (e) |
| 1056 | "Handle a delete frame event E. | 1060 | "Handle a delete frame event E. |
| 1057 | If the deleted frame is the frame SPEEDBAR is attached to, | 1061 | If the deleted frame is the frame speedbar is attached to, |
| 1058 | we need to delete speedbar also." | 1062 | we need to delete speedbar also." |
| 1059 | (when (and speedbar-frame | 1063 | (when (and speedbar-frame |
| 1060 | (eq (car (car (cdr e))) ;; frame to be deleted | 1064 | (eq (car (car (cdr e))) ;; frame to be deleted |
| @@ -1140,7 +1144,7 @@ in the selected file. | |||
| 1140 | speedbar-buffer) | 1144 | speedbar-buffer) |
| 1141 | 1145 | ||
| 1142 | (defmacro speedbar-message (fmt &rest args) | 1146 | (defmacro speedbar-message (fmt &rest args) |
| 1143 | "Like message, but for use in the speedbar frame. | 1147 | "Like `message', but for use in the speedbar frame. |
| 1144 | Argument FMT is the format string, and ARGS are the arguments for message." | 1148 | Argument FMT is the format string, and ARGS are the arguments for message." |
| 1145 | `(dframe-message ,fmt ,@args)) | 1149 | `(dframe-message ,fmt ,@args)) |
| 1146 | 1150 | ||
| @@ -1292,8 +1296,7 @@ and the existence of packages." | |||
| 1292 | (t (speedbar-message nil))))))) | 1296 | (t (speedbar-message nil))))))) |
| 1293 | 1297 | ||
| 1294 | (defun speedbar-show-info-under-mouse () | 1298 | (defun speedbar-show-info-under-mouse () |
| 1295 | "Call the info function for the line under the mouse. | 1299 | "Call the info function for the line under the mouse." |
| 1296 | Optional EVENT is currently not used." | ||
| 1297 | (let ((pos (mouse-position))) ; we ignore event until I use it later. | 1300 | (let ((pos (mouse-position))) ; we ignore event until I use it later. |
| 1298 | (if (equal (car pos) speedbar-frame) | 1301 | (if (equal (car pos) speedbar-frame) |
| 1299 | (save-excursion | 1302 | (save-excursion |
| @@ -1475,7 +1478,7 @@ File style information is displayed with `speedbar-item-info'." | |||
| 1475 | (point) (progn (end-of-line) (point)))))) | 1478 | (point) (progn (end-of-line) (point)))))) |
| 1476 | 1479 | ||
| 1477 | (defun speedbar-item-info () | 1480 | (defun speedbar-item-info () |
| 1478 | "Display info in the mini-buffer about the button the mouse is over. | 1481 | "Display info in the minibuffer about the button the mouse is over. |
| 1479 | This function can be replaced in `speedbar-mode-functions-list' as | 1482 | This function can be replaced in `speedbar-mode-functions-list' as |
| 1480 | `speedbar-item-info'." | 1483 | `speedbar-item-info'." |
| 1481 | (interactive) | 1484 | (interactive) |
| @@ -1553,7 +1556,7 @@ Return nil if not applicable." | |||
| 1553 | nil))))) | 1556 | nil))))) |
| 1554 | 1557 | ||
| 1555 | (defun speedbar-files-item-info () | 1558 | (defun speedbar-files-item-info () |
| 1556 | "Display info in the mini-buffer about the button the mouse is over." | 1559 | "Display info in the minibuffer about the button the mouse is over." |
| 1557 | (if (not speedbar-shown-directories) | 1560 | (if (not speedbar-shown-directories) |
| 1558 | (speedbar-generic-item-info) | 1561 | (speedbar-generic-item-info) |
| 1559 | (or (speedbar-item-info-file-helper) | 1562 | (or (speedbar-item-info-file-helper) |
| @@ -1830,7 +1833,7 @@ This is based on `speedbar-initial-expansion-list-name' referencing | |||
| 1830 | (speedbar-reconfigure-keymaps)))) | 1833 | (speedbar-reconfigure-keymaps)))) |
| 1831 | 1834 | ||
| 1832 | (defun speedbar-fetch-replacement-function (function) | 1835 | (defun speedbar-fetch-replacement-function (function) |
| 1833 | "Return a current mode specific replacement for function, or nil. | 1836 | "Return a current mode-specific replacement for function, or nil. |
| 1834 | Scans `speedbar-mode-functions-list' first for the current mode, then | 1837 | Scans `speedbar-mode-functions-list' first for the current mode, then |
| 1835 | for FUNCTION." | 1838 | for FUNCTION." |
| 1836 | (cdr (assoc function | 1839 | (cdr (assoc function |
| @@ -1847,7 +1850,7 @@ See `speedbar-mode-functions-list' for details." | |||
| 1847 | ;; | 1850 | ;; |
| 1848 | (defun speedbar-maybe-add-localized-support (buffer) | 1851 | (defun speedbar-maybe-add-localized-support (buffer) |
| 1849 | "Quick check function called on BUFFERs by the speedbar timer function. | 1852 | "Quick check function called on BUFFERs by the speedbar timer function. |
| 1850 | Maintains the value of local variables which control speedbars use | 1853 | Maintains the value of local variables which control speedbar's use |
| 1851 | of the special mode functions." | 1854 | of the special mode functions." |
| 1852 | (or speedbar-special-mode-expansion-list | 1855 | (or speedbar-special-mode-expansion-list |
| 1853 | (speedbar-add-localized-speedbar-support buffer))) | 1856 | (speedbar-add-localized-speedbar-support buffer))) |
| @@ -1933,7 +1936,7 @@ the file-system." | |||
| 1933 | 1936 | ||
| 1934 | (defun speedbar-directory-buttons (directory index) | 1937 | (defun speedbar-directory-buttons (directory index) |
| 1935 | "Insert a single button group at point for DIRECTORY. | 1938 | "Insert a single button group at point for DIRECTORY. |
| 1936 | Each directory directory part is a different button. If part of the directory | 1939 | Each directory part is a different button. If part of the directory |
| 1937 | matches the user directory ~, then it is replaced with a ~. | 1940 | matches the user directory ~, then it is replaced with a ~. |
| 1938 | INDEX is not used, but is required by the caller." | 1941 | INDEX is not used, but is required by the caller." |
| 1939 | (let* ((tilde (expand-file-name "~/")) | 1942 | (let* ((tilde (expand-file-name "~/")) |
| @@ -2082,7 +2085,7 @@ position to insert a new item, and that the new item will end with a CR." | |||
| 2082 | "Insert list of FILES starting at point, and indenting all files to LEVEL. | 2085 | "Insert list of FILES starting at point, and indenting all files to LEVEL. |
| 2083 | Tag expandable items with a +, otherwise a ?. Don't highlight ? as we | 2086 | Tag expandable items with a +, otherwise a ?. Don't highlight ? as we |
| 2084 | don't know how to manage them. The input parameter FILES is a cons | 2087 | don't know how to manage them. The input parameter FILES is a cons |
| 2085 | cell of the form ( 'DIRLIST . 'FILELIST )." | 2088 | cell of the form ( 'DIRLIST . 'FILELIST )." |
| 2086 | ;; Start inserting all the directories | 2089 | ;; Start inserting all the directories |
| 2087 | (let ((dirs (car files))) | 2090 | (let ((dirs (car files))) |
| 2088 | (while dirs | 2091 | (while dirs |
| @@ -2150,7 +2153,7 @@ Groups may optionally contain a position." | |||
| 2150 | ))) | 2153 | ))) |
| 2151 | 2154 | ||
| 2152 | (defun speedbar-generic-list-positioned-group-p (sublst) | 2155 | (defun speedbar-generic-list-positioned-group-p (sublst) |
| 2153 | "Non-nil of SUBLST is a group with a position." | 2156 | "Non-nil if SUBLST is a group with a position." |
| 2154 | (and (stringp (car-safe sublst)) | 2157 | (and (stringp (car-safe sublst)) |
| 2155 | (number-or-marker-p (car-safe (cdr-safe sublst))) | 2158 | (number-or-marker-p (car-safe (cdr-safe sublst))) |
| 2156 | (listp (cdr-safe (cdr-safe sublst))) | 2159 | (listp (cdr-safe (cdr-safe sublst))) |
| @@ -2407,7 +2410,7 @@ Make buffer local for your mode.") | |||
| 2407 | "At LEVEL, insert a generic multi-level alist LST. | 2410 | "At LEVEL, insert a generic multi-level alist LST. |
| 2408 | Associations with lists get {+} tags (to expand into more nodes) and | 2411 | Associations with lists get {+} tags (to expand into more nodes) and |
| 2409 | those with positions just get a > as the indicator. {+} buttons will | 2412 | those with positions just get a > as the indicator. {+} buttons will |
| 2410 | have the function EXPAND-FUN and the token is the CDR list. The token | 2413 | have the function EXPAND-FUN and the token is the cdr list. The token |
| 2411 | name will have the function FIND-FUN and not token." | 2414 | name will have the function FIND-FUN and not token." |
| 2412 | ;; Remove imenu rescan button | 2415 | ;; Remove imenu rescan button |
| 2413 | (if (string= (car (car lst)) "*Rescan*") | 2416 | (if (string= (car (car lst)) "*Rescan*") |
| @@ -2564,7 +2567,7 @@ name will have the function FIND-FUN and not token." | |||
| 2564 | (setq expand-local t) | 2567 | (setq expand-local t) |
| 2565 | 2568 | ||
| 2566 | ;; If this directory is NOT in the current list of available | 2569 | ;; If this directory is NOT in the current list of available |
| 2567 | ;; directorys, then use the cache, and set the cache to our new | 2570 | ;; directories, then use the cache, and set the cache to our new |
| 2568 | ;; value. Make sure to unhighlight the current file, or if we | 2571 | ;; value. Make sure to unhighlight the current file, or if we |
| 2569 | ;; come back to this directory, it might be a different file | 2572 | ;; come back to this directory, it might be a different file |
| 2570 | ;; and then we get a mess! | 2573 | ;; and then we get a mess! |
| @@ -2770,8 +2773,7 @@ If new functions are added, their state needs to be updated here." | |||
| 2770 | (defun speedbar-update-current-file () | 2773 | (defun speedbar-update-current-file () |
| 2771 | "Find the current file, and update our visuals to indicate its name. | 2774 | "Find the current file, and update our visuals to indicate its name. |
| 2772 | This is specific to file names. If the file name doesn't show up, but | 2775 | This is specific to file names. If the file name doesn't show up, but |
| 2773 | it should be in the list, then the directory cache needs to be | 2776 | it should be in the list, then the directory cache needs to be updated." |
| 2774 | updated." | ||
| 2775 | (let* ((lastf (selected-frame)) | 2777 | (let* ((lastf (selected-frame)) |
| 2776 | (newcfd (save-excursion | 2778 | (newcfd (save-excursion |
| 2777 | (dframe-select-attached-frame speedbar-frame) | 2779 | (dframe-select-attached-frame speedbar-frame) |
| @@ -2840,8 +2842,8 @@ updated." | |||
| 2840 | 2842 | ||
| 2841 | (defun speedbar-add-indicator (indicator-string &optional replace-this) | 2843 | (defun speedbar-add-indicator (indicator-string &optional replace-this) |
| 2842 | "Add INDICATOR-STRING to the end of this speedbar line. | 2844 | "Add INDICATOR-STRING to the end of this speedbar line. |
| 2843 | If INDICATOR-STRING is space, and REPLACE-THIS is a character, then | 2845 | If INDICATOR-STRING is space, and REPLACE-THIS is a character, |
| 2844 | the existing indicator is removed. If there is already an | 2846 | then the existing indicator is removed. If there is already an |
| 2845 | indicator, then do not add a space." | 2847 | indicator, then do not add a space." |
| 2846 | (beginning-of-line) | 2848 | (beginning-of-line) |
| 2847 | ;; The nature of the beast: Assume we are in "the right place" | 2849 | ;; The nature of the beast: Assume we are in "the right place" |
| @@ -2954,7 +2956,7 @@ to add more types of version control systems." | |||
| 2954 | t))) | 2956 | t))) |
| 2955 | 2957 | ||
| 2956 | (defun speedbar-check-vc-this-line (depth) | 2958 | (defun speedbar-check-vc-this-line (depth) |
| 2957 | "Return t if the file on this line is check of of a version control system. | 2959 | "Return t if the file on this line is checked out of a version control system. |
| 2958 | Parameter DEPTH is a string with the current depth of indentation of | 2960 | Parameter DEPTH is a string with the current depth of indentation of |
| 2959 | the file being checked." | 2961 | the file being checked." |
| 2960 | (let* ((d (string-to-number depth)) | 2962 | (let* ((d (string-to-number depth)) |
| @@ -3198,7 +3200,7 @@ directory with these items. This function is replaceable in | |||
| 3198 | (if rf (funcall rf depth) default-directory)))) | 3200 | (if rf (funcall rf depth) default-directory)))) |
| 3199 | 3201 | ||
| 3200 | (defun speedbar-files-line-directory (&optional depth) | 3202 | (defun speedbar-files-line-directory (&optional depth) |
| 3201 | "Retrieve the directoryname associated with the current line. | 3203 | "Retrieve the directory associated with the current line. |
| 3202 | This may require traversing backwards from DEPTH and combining the default | 3204 | This may require traversing backwards from DEPTH and combining the default |
| 3203 | directory with these items." | 3205 | directory with these items." |
| 3204 | (save-excursion | 3206 | (save-excursion |
| @@ -3483,9 +3485,8 @@ INDENT is the current indentation level." | |||
| 3483 | 3485 | ||
| 3484 | (defun speedbar-tag-expand (text token indent) | 3486 | (defun speedbar-tag-expand (text token indent) |
| 3485 | "Expand a tag sublist. Imenu will return sub-lists of specialized tag types. | 3487 | "Expand a tag sublist. Imenu will return sub-lists of specialized tag types. |
| 3486 | Etags does not support this feature. TEXT will be the button | 3488 | Etags does not support this feature. TEXT will be the button string. |
| 3487 | string. TOKEN will be the list, and INDENT is the current indentation | 3489 | TOKEN will be the list, and INDENT is the current indentation level." |
| 3488 | level." | ||
| 3489 | (cond ((string-match "+" text) ;we have to expand this file | 3490 | (cond ((string-match "+" text) ;we have to expand this file |
| 3490 | (speedbar-change-expand-button-char ?-) | 3491 | (speedbar-change-expand-button-char ?-) |
| 3491 | (speedbar-with-writable | 3492 | (speedbar-with-writable |
| @@ -3770,7 +3771,7 @@ Each symbol will be associated with its line position in FILE." | |||
| 3770 | ; (delete-region (match-beginning 1) (match-end 1))))) | 3771 | ; (delete-region (match-beginning 1) (match-end 1))))) |
| 3771 | 3772 | ||
| 3772 | (defun speedbar-extract-one-symbol (expr) | 3773 | (defun speedbar-extract-one-symbol (expr) |
| 3773 | "At point, return nil, or one alist in the form: (SYMBOL . POSITION) | 3774 | "At point, return nil, or one alist in the form (SYMBOL . POSITION). |
| 3774 | The line should contain output from etags. Parse the output using the | 3775 | The line should contain output from etags. Parse the output using the |
| 3775 | regular expression EXPR." | 3776 | regular expression EXPR." |
| 3776 | (let* ((sym (if (stringp expr) | 3777 | (let* ((sym (if (stringp expr) |
| @@ -3867,12 +3868,12 @@ regular expression EXPR." | |||
| 3867 | 3868 | ||
| 3868 | (defun speedbar-buffer-buttons (directory zero) | 3869 | (defun speedbar-buffer-buttons (directory zero) |
| 3869 | "Create speedbar buttons based on the buffers currently loaded. | 3870 | "Create speedbar buttons based on the buffers currently loaded. |
| 3870 | DIRECTORY is the directory to the currently active buffer, and ZERO is 0." | 3871 | DIRECTORY is the directory of the currently active buffer, and ZERO is 0." |
| 3871 | (speedbar-buffer-buttons-engine nil)) | 3872 | (speedbar-buffer-buttons-engine nil)) |
| 3872 | 3873 | ||
| 3873 | (defun speedbar-buffer-buttons-temp (directory zero) | 3874 | (defun speedbar-buffer-buttons-temp (directory zero) |
| 3874 | "Create speedbar buttons based on the buffers currently loaded. | 3875 | "Create speedbar buttons based on the buffers currently loaded. |
| 3875 | DIRECTORY is the directory to the currently active buffer, and ZERO is 0." | 3876 | DIRECTORY is the directory of the currently active buffer, and ZERO is 0." |
| 3876 | (speedbar-buffer-buttons-engine t)) | 3877 | (speedbar-buffer-buttons-engine t)) |
| 3877 | 3878 | ||
| 3878 | (defun speedbar-buffer-buttons-engine (temp) | 3879 | (defun speedbar-buffer-buttons-engine (temp) |
| @@ -3950,7 +3951,7 @@ Argument BUFFER is the buffer being tested." | |||
| 3950 | (or (buffer-file-name buffer) "<No file>")))))) | 3951 | (or (buffer-file-name buffer) "<No file>")))))) |
| 3951 | 3952 | ||
| 3952 | (defun speedbar-buffers-line-directory (&optional depth) | 3953 | (defun speedbar-buffers-line-directory (&optional depth) |
| 3953 | "Fetch the full directory to the file (buffer) specified on the current line. | 3954 | "Fetch the directory of the file (buffer) specified on the current line. |
| 3954 | Optional argument DEPTH specifies the current depth of the back search." | 3955 | Optional argument DEPTH specifies the current depth of the back search." |
| 3955 | (save-excursion | 3956 | (save-excursion |
| 3956 | (end-of-line) | 3957 | (end-of-line) |
| @@ -4037,11 +4038,11 @@ TEXT is the buffer's name, TOKEN and INDENT are unused." | |||
| 4037 | (remove-hook 'pre-command-hook 'speedbar-unhighlight-one-tag-line)) | 4038 | (remove-hook 'pre-command-hook 'speedbar-unhighlight-one-tag-line)) |
| 4038 | 4039 | ||
| 4039 | (defun speedbar-recenter-to-top () | 4040 | (defun speedbar-recenter-to-top () |
| 4040 | "Recenter the current buffer so POINT is on the top of the window." | 4041 | "Recenter the current buffer so point is on the top of the window." |
| 4041 | (recenter 1)) | 4042 | (recenter 1)) |
| 4042 | 4043 | ||
| 4043 | (defun speedbar-recenter () | 4044 | (defun speedbar-recenter () |
| 4044 | "Recenter the current buffer so POINT is in the center of the window." | 4045 | "Recenter the current buffer so point is in the center of the window." |
| 4045 | (recenter (/ (window-height (selected-window)) 2))) | 4046 | (recenter (/ (window-height (selected-window)) 2))) |
| 4046 | 4047 | ||
| 4047 | 4048 | ||
| @@ -4114,7 +4115,7 @@ TEXT is the buffer's name, TOKEN and INDENT are unused." | |||
| 4114 | (:background "white" | 4115 | (:background "white" |
| 4115 | :foreground "black" | 4116 | :foreground "black" |
| 4116 | :overline "black"))) | 4117 | :overline "black"))) |
| 4117 | "Face used for separator labes in a display." | 4118 | "Face used for separator labels in a display." |
| 4118 | :group 'speedbar-faces) | 4119 | :group 'speedbar-faces) |
| 4119 | 4120 | ||
| 4120 | ;; some edebug hooks | 4121 | ;; some edebug hooks |