aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/ChangeLog7
-rw-r--r--lisp/bookmark.el16
2 files changed, 8 insertions, 15 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index b4282bdf22d..8483c1bc1f1 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,12 +1,17 @@
12010-01-02 Karl Fogel <kfogel@red-bean.com> 12010-01-02 Karl Fogel <kfogel@red-bean.com>
2 2
3 * bookmark.el (bookmark-bmenu-save): Just depend on the new logic
4 for showing buffer modified state (as added in the previous change).
5
62010-01-02 Karl Fogel <kfogel@red-bean.com>
7
3 * bookmark.el: Show modified state of bookmark buffer more accurately. 8 * bookmark.el: Show modified state of bookmark buffer more accurately.
4 (bookmark-bmenu-list): Initialize buffer-modified-p properly. 9 (bookmark-bmenu-list): Initialize buffer-modified-p properly.
5 (bookmark-send-edited-annotation): Mark bookmark-alist as modified. 10 (bookmark-send-edited-annotation): Mark bookmark-alist as modified.
6 (with-buffer-modified-unmodified): New macro. 11 (with-buffer-modified-unmodified): New macro.
7 (bookmark-bmenu-show-filenames, bookmark-bmenu-hide-filenames) 12 (bookmark-bmenu-show-filenames, bookmark-bmenu-hide-filenames)
8 (bookmark-bmenu-mark, bookmark-bmenu-unmark, bookmark-bmenu-delete): 13 (bookmark-bmenu-mark, bookmark-bmenu-unmark, bookmark-bmenu-delete):
9 Use new macro to preserve the buffer-modified state. 14 Use new macro to preserve the buffer modified state.
10 15
112010-01-02 Karl Fogel <kfogel@red-bean.com> 162010-01-02 Karl Fogel <kfogel@red-bean.com>
12 17
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."
1818 (interactive "P") 1818 (interactive "P")
1819 (save-excursion 1819 (save-excursion
1820 (save-window-excursion 1820 (save-window-excursion
1821 (bookmark-save parg))) 1821 (bookmark-save parg)
1822 ;; Show the buffer as unmodified after saving, but only if there are 1822 (set-buffer-modified-p nil))))
1823 ;; no marks: marks are not saved with the bookmarks, therefore from
1824 ;; the user's point of view they are a "modification" in the buffer
1825 ;;
1826 ;; FIXME: Ideally, if the buffer were unmodified when there are no
1827 ;; marks, and then some marks are made and removed without being
1828 ;; executed, then the buffer would be restored to unmodified state.
1829 ;; But that would require bookmark-specific logic to track buffer
1830 ;; modification. It might be worth it, but it's fine not to have it
1831 ;; too -- the worst outcome is that the user might be tempted to
1832 ;; save the bookmark list when it technically doesn't need saving.
1833 (if (not (bookmark-bmenu-any-marks))
1834 (set-buffer-modified-p nil)))
1835 1823
1836 1824
1837(defun bookmark-bmenu-load () 1825(defun bookmark-bmenu-load ()