1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-29 11:02:01 +00:00

* 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
This commit is contained in:
Karl Fogel 2010-01-02 00:00:55 -05:00
parent aef053eb79
commit 5ae329f4c8
2 changed files with 23 additions and 4 deletions

View File

@ -1,3 +1,17 @@
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:

View File

@ -177,7 +177,7 @@ recently set ones come first, oldest ones come last)."
(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
@ -1592,10 +1592,12 @@ deletion, or > if it is flagged for displaying."
" *" " ")
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")))
@ -1747,7 +1749,10 @@ last full line, move to the last full line. The return value is undefined."
(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)