[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: bookmark.el bug report
From: |
Drew Adams |
Subject: |
RE: bookmark.el bug report |
Date: |
Mon, 28 Dec 2009 07:58:29 -0800 |
> (defun bookmark-bmenu-bookmark ()
> "Return the name of the bookmark on this line."
> (when (bookmark-bmenu-check-position)
> (save-excursion
> (forward-line 0) (forward-char 3)
> (get-text-property (point) 'bmkext-bookmark-name))))
1. There is no need for the `bookmark-bmenu-check-position' test. All such
pseudotests can be removed - that function always returns non-nil (unless the
`bookmark-alist' is nil).
2. Wrap the `save-excursion' in `ignore-errors' or a `condition-case', for the
`forward-char' at eob. E.g., this is the definition in bookmark+.el:
(defun bookmark-bmenu-bookmark ()
"Return the name of the bookmark on this line."
(condition-case nil
(save-excursion
(forward-line 0) (forward-char 3)
(get-text-property (point) 'bookmarkp-bookmark-name))
(error nil)))
- bookmark.el bug report, Sun Yijiang, 2009/12/28
- Re: bookmark.el bug report, Karl Fogel, 2009/12/28
- Re: bookmark.el bug report, Thierry Volpiatto, 2009/12/28
- RE: bookmark.el bug report,
Drew Adams <=
- Re: bookmark.el bug report, Karl Fogel, 2009/12/28
- Re: bookmark.el bug report, Stefan Monnier, 2009/12/30
- Re: bookmark.el bug report, Thierry Volpiatto, 2009/12/30
- Re: bookmark.el bug report, Stefan Monnier, 2009/12/30
- RE: bookmark.el bug report, Drew Adams, 2009/12/30
- RE: bookmark.el bug report, Drew Adams, 2009/12/30
- Re: bookmark.el bug report, Thierry Volpiatto, 2009/12/30
- Re: bookmark.el bug report, Stefan Monnier, 2009/12/30