]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp/bookmark.el (bookmark-delete): Don't let batch arg prevent saving.
authorKarl Fogel <kfogel@red-bean.com>
Fri, 9 Oct 2009 06:44:40 +0000 (06:44 +0000)
committerKarl Fogel <kfogel@red-bean.com>
Fri, 9 Oct 2009 06:44:40 +0000 (06:44 +0000)
  (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)

lisp/ChangeLog
lisp/bookmark.el

index cb393b306aeb54bcfb5f3b6c56150ae5280b89fb..4a40500b77acfa831ca15f37357182954869970e 100644 (file)
@@ -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'.
index 300e8b8e2c85da82d75ce9301748f34fcf2ff6d9..094e3bb883669c88ea2ed76a0e24f0655b0bba80 100644 (file)
@@ -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 \\<bookmark-bmenu-mode-map>\\
           (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")
     ))