aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNick Roberts2006-02-20 00:01:10 +0000
committerNick Roberts2006-02-20 00:01:10 +0000
commit37eadbacb41608a0ce13653f378b52ee5e8fb9d2 (patch)
tree47374e176afcd56a038b8576e36e1db171066501
parent5498b6af64b762d00074b4135355046f066fad38 (diff)
downloademacs-37eadbacb41608a0ce13653f378b52ee5e8fb9d2.tar.gz
emacs-37eadbacb41608a0ce13653f378b52ee5e8fb9d2.zip
(speedbar-make-button): Keep text properties
of string arguments if desired.
-rw-r--r--lisp/speedbar.el8
1 files changed, 6 insertions, 2 deletions
diff --git a/lisp/speedbar.el b/lisp/speedbar.el
index 4e639c586f2..4f0e2edf7cb 100644
--- a/lisp/speedbar.el
+++ b/lisp/speedbar.el
@@ -1708,9 +1708,13 @@ Separators are not active, have no labels, depth, or actions."
1708(defun speedbar-make-button (start end face mouse function &optional token) 1708(defun speedbar-make-button (start end face mouse function &optional token)
1709 "Create a button from START to END, with FACE as the display face. 1709 "Create a button from START to END, with FACE as the display face.
1710MOUSE is the mouse face. When this button is clicked on FUNCTION 1710MOUSE is the mouse face. When this button is clicked on FUNCTION
1711will be run with the TOKEN parameter (any Lisp object)" 1711will be run with the TOKEN parameter (any Lisp object). If FACE
1712is t use the text properties of the string that is passed as an
1713argument."
1714 (unless (eq face t)
1715 (put-text-property start end 'face face))
1712 (add-text-properties 1716 (add-text-properties
1713 start end `(face ,face mouse-face ,mouse invisible nil 1717 start end `(mouse-face ,mouse invisible nil
1714 speedbar-text ,(buffer-substring-no-properties start end))) 1718 speedbar-text ,(buffer-substring-no-properties start end)))
1715 (if speedbar-use-tool-tips-flag 1719 (if speedbar-use-tool-tips-flag
1716 (put-text-property start end 'help-echo #'dframe-help-echo)) 1720 (put-text-property start end 'help-echo #'dframe-help-echo))