]> git.eshelyaron.com Git - emacs.git/commitdiff
(bookmark-insert-location, bookmark-bmenu-list)
authorEli Zaretskii <eliz@gnu.org>
Sun, 24 Jun 2001 11:14:12 +0000 (11:14 +0000)
committerEli Zaretskii <eliz@gnu.org>
Sun, 24 Jun 2001 11:14:12 +0000 (11:14 +0000)
(bookmark-bmenu-hide-filenames): Add help-echo to mouse-highlighted text.
(bookmark-bmenu-show-filenames): Remove help-echo property from
the whitespace.

lisp/bookmark.el

index 8ad4842e28d020ff48fa6bd49dcdd2e8d138be09..4582a55f948d78f33d50100f75f7839aaff401d2 100644 (file)
@@ -1171,11 +1171,12 @@ minibuffer history list `bookmark-history'."
     (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 @@ deletion, or > if it is flagged for displaying."
         (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 @@ Optional argument SHOW means show them unconditionally."
                ;; 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 @@ Optional argument SHOW means show them unconditionally."
                (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))))))))