Mercurial > emacs
changeset 105532:cb911fe6af8f
* lisp/bookmark.el (bookmark-delete): Don't let batch arg prevent saving.
(bookmark-bmenu-execute-deletions): Don't save here, as bookmark-delete
will now do so if necessary.
Suggested by: Thierry Volpiatto <thierry.volpiatto {_AT_} gmail.com>
(Bug#4348)
author | Karl Fogel <kfogel@red-bean.com> |
---|---|
date | Fri, 09 Oct 2009 06:44:40 +0000 |
parents | ac0c30ffce5c |
children | 13b20c90218f |
files | lisp/ChangeLog lisp/bookmark.el |
diffstat | 2 files changed, 15 insertions(+), 12 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/ChangeLog Fri Oct 09 06:29:56 2009 +0000 +++ b/lisp/ChangeLog Fri Oct 09 06:44:40 2009 +0000 @@ -1,3 +1,12 @@ +2009-10-09 Karl Fogel <kfogel@red-bean.com> + + * lisp/bookmark.el (bookmark-delete): Don't let batch arg prevent + saving. + (bookmark-bmenu-execute-deletions): Don't save here, as + bookmark-delete will now do so if necessary. + Suggested by: Thierry Volpiatto <thierry.volpiatto {_AT_} gmail.com> + (Bug#4348) + 2009-10-09 Glenn Morris <rgm@gnu.org> * mail/emacsbug.el (report-emacs-bug): Also print `features'.
--- a/lisp/bookmark.el Fri Oct 09 06:29:56 2009 +0000 +++ b/lisp/bookmark.el Fri Oct 09 06:44:40 2009 +0000 @@ -1261,14 +1261,12 @@ ;; occurrence has been deleted (or (bookmark-get-bookmark bookmark-current-bookmark 'noerror) (setq bookmark-current-bookmark nil))) - ;; Don't rebuild the list - (if batch - nil - (bookmark-bmenu-surreptitiously-rebuild-list) - (setq bookmark-alist-modification-count - (1+ bookmark-alist-modification-count)) - (if (bookmark-time-to-save-p) - (bookmark-save)))) + (unless batch + (bookmark-bmenu-surreptitiously-rebuild-list)) + (setq bookmark-alist-modification-count + (1+ bookmark-alist-modification-count)) + (when (bookmark-time-to-save-p) + (bookmark-save))) (defun bookmark-time-to-save-p (&optional final-time) @@ -2018,10 +2016,6 @@ (forward-char o-col)) (goto-char o-point)) (beginning-of-line) - (setq bookmark-alist-modification-count - (1+ bookmark-alist-modification-count)) - (if (bookmark-time-to-save-p) - (bookmark-save)) (message "Deleting bookmarks...done") ))