From: Karl Fogel Date: Sat, 2 Jan 2010 18:57:02 +0000 (-0500) Subject: * lisp/bookmark.el (bookmark-bmenu-save): Just depend on the new logic X-Git-Tag: emacs-pretest-23.1.92~97 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=cc4d3cad09ee2f8fbe0b6bc6bc293590dce93073;p=emacs.git * lisp/bookmark.el (bookmark-bmenu-save): Just depend on the new logic for showing buffer modified state (as added in the previous change). --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index b4282bdf22d..8483c1bc1f1 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2010-01-02 Karl Fogel + + * bookmark.el (bookmark-bmenu-save): Just depend on the new logic + for showing buffer modified state (as added in the previous change). + 2010-01-02 Karl Fogel * bookmark.el: Show modified state of bookmark buffer more accurately. @@ -6,7 +11,7 @@ (with-buffer-modified-unmodified): New macro. (bookmark-bmenu-show-filenames, bookmark-bmenu-hide-filenames) (bookmark-bmenu-mark, bookmark-bmenu-unmark, bookmark-bmenu-delete): - Use new macro to preserve the buffer-modified state. + Use new macro to preserve the buffer modified state. 2010-01-02 Karl Fogel diff --git a/lisp/bookmark.el b/lisp/bookmark.el index 5326c292685..215495d7c7d 100644 --- a/lisp/bookmark.el +++ b/lisp/bookmark.el @@ -1818,20 +1818,8 @@ With a prefix arg, prompts for a file to save them in." (interactive "P") (save-excursion (save-window-excursion - (bookmark-save parg))) - ;; Show the buffer as unmodified after saving, but only if there are - ;; no marks: marks are not saved with the bookmarks, therefore from - ;; the user's point of view they are a "modification" in the buffer - ;; - ;; FIXME: Ideally, if the buffer were unmodified when there are no - ;; marks, and then some marks are made and removed without being - ;; executed, then the buffer would be restored to unmodified state. - ;; But that would require bookmark-specific logic to track buffer - ;; modification. It might be worth it, but it's fine not to have it - ;; too -- the worst outcome is that the user might be tempted to - ;; save the bookmark list when it technically doesn't need saving. - (if (not (bookmark-bmenu-any-marks)) - (set-buffer-modified-p nil))) + (bookmark-save parg) + (set-buffer-modified-p nil)))) (defun bookmark-bmenu-load ()