From: Karl Fogel Date: Fri, 9 Oct 2009 06:44:40 +0000 (+0000) Subject: * lisp/bookmark.el (bookmark-delete): Don't let batch arg prevent saving. X-Git-Tag: emacs-pretest-23.1.90~866 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=33e97a284ffbcfb4b200e4bdb427faf5d48f9a63;p=emacs.git * 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 (Bug#4348) --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index cb393b306ae..4a40500b77a 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,12 @@ +2009-10-09 Karl Fogel + + * 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 + (Bug#4348) + 2009-10-09 Glenn Morris * mail/emacsbug.el (report-emacs-bug): Also print `features'. diff --git a/lisp/bookmark.el b/lisp/bookmark.el index 300e8b8e2c8..094e3bb8836 100644 --- a/lisp/bookmark.el +++ b/lisp/bookmark.el @@ -1261,14 +1261,12 @@ probably because we were called from there." ;; 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 @@ To carry out the deletions that you've marked, use \\\\ (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") ))