aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKarl Fogel2013-03-07 16:35:47 -0600
committerKarl Fogel2013-03-07 16:35:47 -0600
commitc095b77025b5bc3ea72972b33dae025b4c52abeb (patch)
tree93f4709eb6300fa84f604769815b972bf154fc96
parent7a78e19f24ff07f5e57c63758ee4a98dd61453fb (diff)
downloademacs-c095b77025b5bc3ea72972b33dae025b4c52abeb.tar.gz
emacs-c095b77025b5bc3ea72972b33dae025b4c52abeb.zip
* bookmark.el: Define a face to highlight bookmark names in
bookmark menu buffers, where the default is a bold face similarly to buffer names in buffer menu buffers. Patch by Matthias Meulien <orontee {_AT_} gmail.com>. (bookmark-menu-bookmark): New face to highlight bookmark names. (bookmark-insert-location): Removes dupplicated text property to conform to buffer list (see `list-buffers') (bookmark-bmenu-list, bookmark-bmenu-hide-filenames): Apply face `bookmark-menu-bookmark' to bookmark names.
-rw-r--r--lisp/ChangeLog13
-rw-r--r--lisp/bookmark.el25
2 files changed, 23 insertions, 15 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index f1ca958044b..4f24f5b2c8c 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,5 +1,18 @@
12013-03-07 Karl Fogel <kfogel@red-bean.com> 12013-03-07 Karl Fogel <kfogel@red-bean.com>
2 2
3 * bookmark.el: Define a face to highlight bookmark names in
4 bookmark menu buffers, where the default is a bold face similarly
5 to buffer names in buffer menu buffers. Patch by Matthias Meulien
6 <orontee {_AT_} gmail.com>.
7
8 (bookmark-menu-bookmark): New face to highlight bookmark names.
9 (bookmark-insert-location): Remove duplicated text property to
10 conform to buffer list (see `list-buffers').
11 (bookmark-bmenu-list, bookmark-bmenu-hide-filenames): Apply face
12 `bookmark-menu-bookmark' to bookmark names.
13
142013-03-07 Karl Fogel <kfogel@red-bean.com>
15
3 * bookmark.el: Display the bookmark list header similarly to the 16 * bookmark.el: Display the bookmark list header similarly to the
4 buffer list header (see `list-buffers'), where the default is now 17 buffer list header (see `list-buffers'), where the default is now
5 an immovable/immutable header line. Patch by Matthias Meulien 18 an immovable/immutable header line. Patch by Matthias Meulien
diff --git a/lisp/bookmark.el b/lisp/bookmark.el
index fd6ae217bf8..47e13799625 100644
--- a/lisp/bookmark.el
+++ b/lisp/bookmark.el
@@ -156,6 +156,10 @@ A non-nil value may result in truncated bookmark names."
156 :type 'boolean 156 :type 'boolean
157 :group 'bookmark) 157 :group 'bookmark)
158 158
159(defface bookmark-menu-bookmark
160 '((t (:weight bold)))
161 "Face used to highlight bookmark names in bookmark menu buffers."
162 :group 'bookmark)
159 163
160(defcustom bookmark-menu-length 70 164(defcustom bookmark-menu-length 70
161 "Maximum length of a bookmark name displayed on a popup menu." 165 "Maximum length of a bookmark name displayed on a popup menu."
@@ -1182,18 +1186,7 @@ Optional second arg NO-HISTORY means don't record this in the
1182minibuffer history list `bookmark-history'." 1186minibuffer history list `bookmark-history'."
1183 (interactive (list (bookmark-completing-read "Insert bookmark location"))) 1187 (interactive (list (bookmark-completing-read "Insert bookmark location")))
1184 (or no-history (bookmark-maybe-historicize-string bookmark-name)) 1188 (or no-history (bookmark-maybe-historicize-string bookmark-name))
1185 (let ((start (point))) 1189 (insert (bookmark-location bookmark-name)))
1186 (prog1
1187 (insert (bookmark-location bookmark-name))
1188 (if (display-mouse-p)
1189 (add-text-properties
1190 start
1191 (save-excursion (re-search-backward
1192 "[^ \t]")
1193 (1+ (point)))
1194 '(mouse-face highlight
1195 follow-link t
1196 help-echo "mouse-2: go to this bookmark in other window"))))))
1197 1190
1198;;;###autoload 1191;;;###autoload
1199(defalias 'bookmark-locate 'bookmark-insert-location) 1192(defalias 'bookmark-locate 'bookmark-insert-location)
@@ -1578,7 +1571,8 @@ deletion, or > if it is flagged for displaying."
1578 (when (display-mouse-p) 1571 (when (display-mouse-p)
1579 (add-text-properties 1572 (add-text-properties
1580 (+ bookmark-bmenu-marks-width start) end 1573 (+ bookmark-bmenu-marks-width start) end
1581 '(mouse-face highlight 1574 '(font-lock-face bookmark-menu-bookmark
1575 mouse-face highlight
1582 follow-link t 1576 follow-link t
1583 help-echo "mouse-2: go to this bookmark in other window"))) 1577 help-echo "mouse-2: go to this bookmark in other window")))
1584 (insert "\n"))) 1578 (insert "\n")))
@@ -1726,8 +1720,9 @@ mainly for debugging, and should not be necessary in normal use."
1726 (if (display-mouse-p) 1720 (if (display-mouse-p)
1727 (add-text-properties 1721 (add-text-properties
1728 start (point) 1722 start (point)
1729 '(mouse-face 1723 '(font-lock-face bookmark-menu-bookmark
1730 highlight follow-link t help-echo 1724 mouse-face highlight
1725 follow-link t help-echo
1731 "mouse-2: go to this bookmark in other window")))) 1726 "mouse-2: go to this bookmark in other window"))))
1732 (forward-line 1))))))) 1727 (forward-line 1)))))))
1733 1728