changeset 38173:fe0513d0f974

(bookmark-insert-location, bookmark-bmenu-list) (bookmark-bmenu-hide-filenames): Add help-echo to mouse-highlighted text. (bookmark-bmenu-show-filenames): Remove help-echo property from the whitespace.
author Eli Zaretskii <eliz@gnu.org>
date Sun, 24 Jun 2001 11:14:12 +0000
parents aad260e72f97
children c91c4f77f5fb
files lisp/bookmark.el
diffstat 1 files changed, 20 insertions(+), 16 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/bookmark.el	Sun Jun 24 08:17:21 2001 +0000
+++ b/lisp/bookmark.el	Sun Jun 24 11:14:12 2001 +0000
@@ -1171,11 +1171,12 @@
     (prog1
 	(insert (bookmark-location bookmark)) ; *Return this line*
       (if (and (display-color-p) (display-mouse-p))
-	  (put-text-property start
-			     (save-excursion (re-search-backward
-					      "[^ \t]")
-					     (1+ (point)))
-			     'mouse-face 'highlight)))))
+	  (add-text-properties start
+			       (save-excursion (re-search-backward
+						"[^ \t]")
+					       (1+ (point)))
+			       '(mouse-face highlight
+				 help-echo "mouse-2: go to this bookmark"))))))
 
 ;;;###autoload
 (defalias 'bookmark-locate 'bookmark-insert-location)
@@ -1557,11 +1558,12 @@
 	 (let ((start (point)))
 	   (insert (bookmark-name-from-full-record full-record))
 	   (if (and (display-color-p) (display-mouse-p))
-	       (put-text-property start
-				  (save-excursion (re-search-backward
-						   "[^ \t]")
-						  (1+ (point)))
-				  'mouse-face 'highlight))
+	       (add-text-properties start
+				    (save-excursion (re-search-backward
+						     "[^ \t]")
+						    (1+ (point)))
+				    '(mouse-face highlight
+				      help-echo "mouse-2: go to this bookmark")))
 	   (insert "\n")
 	   )))
      bookmark-alist))
@@ -1654,7 +1656,7 @@
 		;; Strip off `mouse-face' from the white spaces region.
 		(if (and (display-color-p) (display-mouse-p))
 		    (remove-text-properties start (point)
-					    '(mouse-face))))
+					    '(mouse-face nil help-echo nil))))
 	      (delete-region (point) (progn (end-of-line) (point)))
               (insert "  ")
               ;; Pass the NO-HISTORY arg:
@@ -1684,11 +1686,13 @@
 		(let ((start (point)))
 		  (insert (car bookmark-bmenu-hidden-bookmarks))
 		  (if (and (display-color-p) (display-mouse-p))
-		      (put-text-property start
-					 (save-excursion (re-search-backward
-							  "[^ \t]")
-							 (1+ (point)))
-					 'mouse-face 'highlight)))
+		      (add-text-properties start
+					   (save-excursion (re-search-backward
+							    "[^ \t]")
+							   (1+ (point)))
+					   '(mouse-face highlight
+					     help-echo
+					     "mouse-2: go to this bookmark"))))
                 (setq bookmark-bmenu-hidden-bookmarks
                       (cdr bookmark-bmenu-hidden-bookmarks))
                 (forward-line 1))))))))