From: Karl Fogel Date: Sat, 2 Jan 2010 05:00:55 +0000 (-0500) Subject: * lisp/bookmark.el (bookmark-bmenu-marks-width): Define to 1, not 2. X-Git-Tag: emacs-pretest-23.1.92~107 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=5ae329f4c86fa4eff1d30d80f82e4d80ff3da81d;p=emacs.git * 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 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 --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 74b4cc1dbca..4a23bf13396 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,17 @@ +2010-01-02 Karl Fogel + + * 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 + 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 * bookmark.el: Improvements suggested by Drew Adams: diff --git a/lisp/bookmark.el b/lisp/bookmark.el index 74d16c16fc6..190ce58689f 100644 --- a/lisp/bookmark.el +++ b/lisp/bookmark.el @@ -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)