Function: speedbar-make-button
speedbar-make-button is a byte-compiled function defined in
speedbar.el.gz.
Signature
(speedbar-make-button START END FACE MOUSE FUNCTION &optional TOKEN)
Documentation
Create a button from START to END, with FACE as the display face.
MOUSE is the mouse face. When this button is clicked on FUNCTION will be run with the TOKEN parameter (any Lisp object). If FACE is t use the text properties of the string that is passed as an argument.
Source Code
;; Defined in /usr/src/emacs/lisp/speedbar.el.gz
(defun speedbar-make-button (start end face mouse function &optional token)
"Create a button from START to END, with FACE as the display face.
MOUSE is the mouse face. When this button is clicked on FUNCTION
will be run with the TOKEN parameter (any Lisp object). If FACE
is t use the text properties of the string that is passed as an
argument."
(unless (eq face t)
(put-text-property start end 'face face))
(add-text-properties
start end `(mouse-face ,mouse invisible nil
speedbar-text ,(buffer-substring-no-properties start end)))
(if speedbar-use-tool-tips-flag
(put-text-property start end 'help-echo #'dframe-help-echo))
(if function (put-text-property start end 'speedbar-function function))
(if token (put-text-property start end 'speedbar-token token))
;; So far the only text we have is less than 3 chars.
(if (<= (- end start) 3)
(speedbar-insert-image-button-maybe start (- end start)))
)