+2010-01-02 Karl Fogel <kfogel@red-bean.com>
+
+ * lisp/bookmark.el (bookmark-bmenu-marks-width): Define to 1, not 2.
+ (bookmark-bmenu-list, bookmark-bmenu-bookmark): Calculate property
+ positions by using `bookmark-bmenu-marks-width', instead of hardcoding.
+ This fixes the `bookmark-bmenu-execute-deletions' bug reported here:
+
+ http://lists.gnu.org/archive/html/emacs-devel/2009-12/msg00819.html
+ From: Sun Yijiang <sunyijiang {_AT_} gmail.com>
+ To: emacs-devel {_AT_} gnu.org
+ Subject: bookmark.el bug report
+ Date: Mon, 28 Dec 2009 14:19:16 +0800
+ Message-ID: 5065e2900912272219y3734fc9fsdaee41167ef99ad7@mail.gmail.com
+
2010-01-02 Karl Fogel <kfogel@red-bean.com>
* bookmark.el: Improvements suggested by Drew Adams:
(defconst bookmark-bmenu-header-height 2
"Number of lines used for the *Bookmark List* header.")
-(defconst bookmark-bmenu-marks-width 2
+(defconst bookmark-bmenu-marks-width 1
"Number of columns (chars) used for the *Bookmark List* marks column.")
(defcustom bookmark-bmenu-file-column 30
" *" " ")
name)
(setq end (point))
- (put-text-property start (+ 2 start) 'bookmark-name-prop name)
+ (put-text-property start
+ (+ bookmark-bmenu-marks-width 1 start)
+ 'bookmark-name-prop name)
(when (display-mouse-p)
(add-text-properties
- (+ 2 start) end
+ (+ bookmark-bmenu-marks-width 1 start) end
'(mouse-face highlight
follow-link t
help-echo "mouse-2: go to this bookmark in other window")))
(defun bookmark-bmenu-bookmark ()
"Return the bookmark for this line in an interactive bookmark list buffer."
(bookmark-bmenu-ensure-position)
- (get-text-property (line-beginning-position) 'bookmark-name-prop))
+ (save-excursion
+ (beginning-of-line)
+ (forward-char bookmark-bmenu-marks-width)
+ (get-text-property (point) 'bookmark-name-prop)))
(defun bookmark-show-annotation (bookmark)