changeset 106712:ba9ed2ec36e5

* lisp/bookmark.el (bookmark-bmenu-save): Just depend on the new logic for showing buffer modified state (as added in the previous change).
author Karl Fogel <kfogel@red-bean.com>
date Sat, 02 Jan 2010 13:57:02 -0500
parents b87d77f96245
children b6737bf6bd0b
files lisp/ChangeLog lisp/bookmark.el
diffstat 2 files changed, 8 insertions(+), 15 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Sat Jan 02 13:55:19 2010 -0500
+++ b/lisp/ChangeLog	Sat Jan 02 13:57:02 2010 -0500
@@ -1,3 +1,8 @@
+2010-01-02  Karl Fogel  <kfogel@red-bean.com>
+
+	* 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  <kfogel@red-bean.com>
 
 	* 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  <kfogel@red-bean.com>
 
--- a/lisp/bookmark.el	Sat Jan 02 13:55:19 2010 -0500
+++ b/lisp/bookmark.el	Sat Jan 02 13:57:02 2010 -0500
@@ -1818,20 +1818,8 @@
   (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 ()