comparison lisp/speedbar.el @ 76017:f110ee6599bf

(speedbar-frame-mode, speedbar-frame-width, speedbar-show-unknown-files, speedbar-item-info-file-helper, speedbar-item-info-tag-helper): Doc fixes.
author Juanma Barranquero <lekktu@gmail.com>
date Mon, 19 Feb 2007 13:37:23 +0000
parents f1fe767eedcb
children e49170723831 dd7c098af727
comparison
equal deleted inserted replaced
76016:dea718e903a0 76017:f110ee6599bf
314 :group 'speedbar 314 :group 'speedbar
315 :type 'hook) 315 :type 'hook)
316 316
317 (defcustom speedbar-show-unknown-files nil 317 (defcustom speedbar-show-unknown-files nil
318 "*Non-nil show files we can't expand with a ? in the expand button. 318 "*Non-nil show files we can't expand with a ? in the expand button.
319 nil means don't show the file in the list." 319 A nil value means don't show the file in the list."
320 :group 'speedbar 320 :group 'speedbar
321 :type 'boolean) 321 :type 'boolean)
322 322
323 ;;; EVENTUALLY REMOVE THESE 323 ;;; EVENTUALLY REMOVE THESE
324 324
973 ;;;###autoload 973 ;;;###autoload
974 (defalias 'speedbar 'speedbar-frame-mode) 974 (defalias 'speedbar 'speedbar-frame-mode)
975 ;;;###autoload 975 ;;;###autoload
976 (defun speedbar-frame-mode (&optional arg) 976 (defun speedbar-frame-mode (&optional arg)
977 "Enable or disable speedbar. Positive ARG means turn on, negative turn off. 977 "Enable or disable speedbar. Positive ARG means turn on, negative turn off.
978 nil means toggle. Once the speedbar frame is activated, a buffer in 978 A nil ARG means toggle. Once the speedbar frame is activated, a buffer in
979 `speedbar-mode' will be displayed. Currently, only one speedbar is 979 `speedbar-mode' will be displayed. Currently, only one speedbar is
980 supported at a time. 980 supported at a time.
981 `speedbar-before-popup-hook' is called before popping up the speedbar frame. 981 `speedbar-before-popup-hook' is called before popping up the speedbar frame.
982 `speedbar-before-delete-hook' is called before the frame is deleted." 982 `speedbar-before-delete-hook' is called before the frame is deleted."
983 (interactive "P") 983 (interactive "P")
1069 (lambda () (let ((speedbar-update-flag t)) 1069 (lambda () (let ((speedbar-update-flag t))
1070 (speedbar-timer-fn))))) 1070 (speedbar-timer-fn)))))
1071 1071
1072 (defsubst speedbar-frame-width () 1072 (defsubst speedbar-frame-width ()
1073 "Return the width of the speedbar frame in characters. 1073 "Return the width of the speedbar frame in characters.
1074 nil if it doesn't exist." 1074 Return nil if it doesn't exist."
1075 (frame-width speedbar-frame)) 1075 (frame-width speedbar-frame))
1076 1076
1077 (defun speedbar-mode () 1077 (defun speedbar-mode ()
1078 "Major mode for managing a display of directories and tags. 1078 "Major mode for managing a display of directories and tags.
1079 \\<speedbar-key-map> 1079 \\<speedbar-key-map>
1480 (funcall (or (speedbar-fetch-replacement-function 'speedbar-item-info) 1480 (funcall (or (speedbar-fetch-replacement-function 'speedbar-item-info)
1481 'speedbar-generic-item-info)))) 1481 'speedbar-generic-item-info))))
1482 1482
1483 (defun speedbar-item-info-file-helper (&optional filename) 1483 (defun speedbar-item-info-file-helper (&optional filename)
1484 "Display info about a file that is on the current line. 1484 "Display info about a file that is on the current line.
1485 nil if not applicable. If FILENAME, then use that instead of reading 1485 Return nil if not applicable. If FILENAME, then use that
1486 it from the speedbar buffer." 1486 instead of reading it from the speedbar buffer."
1487 (let* ((item (or filename (speedbar-line-file))) 1487 (let* ((item (or filename (speedbar-line-file)))
1488 (attr (if item (file-attributes item) nil))) 1488 (attr (if item (file-attributes item) nil)))
1489 (if (and item attr) (speedbar-message "%s %-6d %s" (nth 8 attr) 1489 (if (and item attr) (speedbar-message "%s %-6d %s" (nth 8 attr)
1490 (nth 7 attr) item) 1490 (nth 7 attr) item)
1491 nil))) 1491 nil)))
1492 1492
1493 (defun speedbar-item-info-tag-helper () 1493 (defun speedbar-item-info-tag-helper ()
1494 "Display info about a tag that is on the current line. 1494 "Display info about a tag that is on the current line.
1495 nil if not applicable." 1495 Return nil if not applicable."
1496 (save-excursion 1496 (save-excursion
1497 (beginning-of-line) 1497 (beginning-of-line)
1498 (if (re-search-forward " [-+=]?> \\([^\n]+\\)" 1498 (if (re-search-forward " [-+=]?> \\([^\n]+\\)"
1499 (save-excursion(end-of-line)(point)) t) 1499 (save-excursion(end-of-line)(point)) t)
1500 (let* ((tag (match-string 1)) 1500 (let* ((tag (match-string 1))