aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKarl Fogel2010-01-02 14:14:13 -0500
committerKarl Fogel2010-01-02 14:14:13 -0500
commit541362823833fe6d4ebfb18574f9029552d7f656 (patch)
treecfb1dd0a7c7291d4dac1c5934ddaa6c9de07342a
parent74255a512cf243a8718e53413d3eca0246aa3b08 (diff)
downloademacs-541362823833fe6d4ebfb18574f9029552d7f656.tar.gz
emacs-541362823833fe6d4ebfb18574f9029552d7f656.zip
* lisp/bookmark.el: Consistently put the text property on the bookmark name.
(bookmark-bmenu-marks-width): Bump back to 2, to include annotation marks. (bookmark-bmenu-hide-filenames): Adjust for above, and put the text property on the bookmark name, instead of not putting it at all. (bookmark-bmenu-list): Fix where we put the text property.
-rw-r--r--lisp/ChangeLog9
-rw-r--r--lisp/bookmark.el15
2 files changed, 17 insertions, 7 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 8483c1bc1f1..965d4780ae2 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,5 +1,14 @@
12010-01-02 Karl Fogel <kfogel@red-bean.com> 12010-01-02 Karl Fogel <kfogel@red-bean.com>
2 2
3 * bookmark.el: Consistently put the text property on the bookmark name.
4 (bookmark-bmenu-marks-width): Bump back to 2, to include
5 annotation marks.
6 (bookmark-bmenu-hide-filenames): Adjust for above, and put the text
7 property on the bookmark name, instead of not putting it at all.
8 (bookmark-bmenu-list): Fix where we put the text property.
9
102010-01-02 Karl Fogel <kfogel@red-bean.com>
11
3 * bookmark.el (bookmark-bmenu-save): Just depend on the new logic 12 * bookmark.el (bookmark-bmenu-save): Just depend on the new logic
4 for showing buffer modified state (as added in the previous change). 13 for showing buffer modified state (as added in the previous change).
5 14
diff --git a/lisp/bookmark.el b/lisp/bookmark.el
index ef1886f612e..38f4478cbb4 100644
--- a/lisp/bookmark.el
+++ b/lisp/bookmark.el
@@ -132,8 +132,9 @@ recently set ones come first, oldest ones come last)."
132(defconst bookmark-bmenu-header-height 2 132(defconst bookmark-bmenu-header-height 2
133 "Number of lines used for the *Bookmark List* header.") 133 "Number of lines used for the *Bookmark List* header.")
134 134
135(defconst bookmark-bmenu-marks-width 1 135(defconst bookmark-bmenu-marks-width 2
136 "Number of columns (chars) used for the *Bookmark List* marks column.") 136 "Number of columns (chars) used for the *Bookmark List* marks column,
137including the annotations column.")
137 138
138(defcustom bookmark-bmenu-file-column 30 139(defcustom bookmark-bmenu-file-column 30
139 "Column at which to display filenames in a buffer listing bookmarks. 140 "Column at which to display filenames in a buffer listing bookmarks.
@@ -1556,12 +1557,11 @@ deletion, or > if it is flagged for displaying."
1556 " *" " ") 1557 " *" " ")
1557 name) 1558 name)
1558 (setq end (point)) 1559 (setq end (point))
1559 (put-text-property start 1560 (put-text-property
1560 (+ bookmark-bmenu-marks-width 1 start) 1561 (+ bookmark-bmenu-marks-width start) end 'bookmark-name-prop name)
1561 'bookmark-name-prop name)
1562 (when (display-mouse-p) 1562 (when (display-mouse-p)
1563 (add-text-properties 1563 (add-text-properties
1564 (+ bookmark-bmenu-marks-width 1 start) end 1564 (+ bookmark-bmenu-marks-width start) end
1565 '(mouse-face highlight 1565 '(mouse-face highlight
1566 follow-link t 1566 follow-link t
1567 help-echo "mouse-2: go to this bookmark in other window"))) 1567 help-echo "mouse-2: go to this bookmark in other window")))
@@ -1682,11 +1682,12 @@ mainly for debugging, and should not be necessary in normal use."
1682 (nreverse bookmark-bmenu-hidden-bookmarks)) 1682 (nreverse bookmark-bmenu-hidden-bookmarks))
1683 (let ((inhibit-read-only t)) 1683 (let ((inhibit-read-only t))
1684 (while bookmark-bmenu-hidden-bookmarks 1684 (while bookmark-bmenu-hidden-bookmarks
1685 (move-to-column (1+ bookmark-bmenu-marks-width) t) 1685 (move-to-column bookmark-bmenu-marks-width t)
1686 (bookmark-kill-line) 1686 (bookmark-kill-line)
1687 (let ((name (pop bookmark-bmenu-hidden-bookmarks)) 1687 (let ((name (pop bookmark-bmenu-hidden-bookmarks))
1688 (start (point))) 1688 (start (point)))
1689 (insert name) 1689 (insert name)
1690 (put-text-property start (point) 'bookmark-name-prop name)
1690 (if (display-mouse-p) 1691 (if (display-mouse-p)
1691 (add-text-properties 1692 (add-text-properties
1692 start (point) 1693 start (point)