aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Volpiatto2013-04-03 21:59:09 -0400
committerStefan Monnier2013-04-03 21:59:09 -0400
commit2575da508408a178f64c9bcdd51e2e0502419a17 (patch)
treed79c0dddc18df7522e77cae826a3930b908db04c
parent397703b4ab20d96ff63c1dc25ffcbe4e76a71ae8 (diff)
downloademacs-2575da508408a178f64c9bcdd51e2e0502419a17.tar.gz
emacs-2575da508408a178f64c9bcdd51e2e0502419a17.zip
* lisp/bookmark.el: Fix deletion of bookmarks.
(bookmark-bmenu-list): Don't toggle filenames if alist is empty. (bookmark-bmenu-execute-deletions): Only skip first line if it's the header. (bookmark-exit-hook-internal): Save even if list is empty. Fixes: debbugs:13972
-rw-r--r--lisp/ChangeLog8
-rw-r--r--lisp/bookmark.el10
2 files changed, 13 insertions, 5 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 78015230bab..d1d4d0d6033 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,11 @@
12013-04-04 Thierry Volpiatto <thierry.volpiatto@gmail.com>
2
3 * bookmark.el: Fix deletion of bookmarks (bug#13972).
4 (bookmark-bmenu-list): Don't toggle filenames if alist is empty.
5 (bookmark-bmenu-execute-deletions): Only skip first line if it's
6 the header.
7 (bookmark-exit-hook-internal): Save even if list is empty.
8
12013-04-04 Yann Hodique <yann.hodique@gmail.com> (tiny change) 92013-04-04 Yann Hodique <yann.hodique@gmail.com> (tiny change)
2 10
3 * emacs-lisp/package.el (package-pinned-packages): New var. 11 * emacs-lisp/package.el (package-pinned-packages): New var.
diff --git a/lisp/bookmark.el b/lisp/bookmark.el
index 47e13799625..c1d8a4a0a5e 100644
--- a/lisp/bookmark.el
+++ b/lisp/bookmark.el
@@ -1582,8 +1582,8 @@ deletion, or > if it is flagged for displaying."
1582 (if bookmark-bmenu-use-header-line 1582 (if bookmark-bmenu-use-header-line
1583 (bookmark-bmenu-set-header) 1583 (bookmark-bmenu-set-header)
1584 (forward-line bookmark-bmenu-inline-header-height)) 1584 (forward-line bookmark-bmenu-inline-header-height))
1585 (if bookmark-bmenu-toggle-filenames 1585 (when (and bookmark-alist bookmark-bmenu-toggle-filenames)
1586 (bookmark-bmenu-toggle-filenames t)))) 1586 (bookmark-bmenu-toggle-filenames t))))
1587 1587
1588;;;###autoload 1588;;;###autoload
1589(defalias 'list-bookmarks 'bookmark-bmenu-list) 1589(defalias 'list-bookmarks 'bookmark-bmenu-list)
@@ -1998,7 +1998,8 @@ To carry out the deletions that you've marked, use \\<bookmark-bmenu-mode-map>\\
1998 (progn (end-of-line) (point)))))) 1998 (progn (end-of-line) (point))))))
1999 (o-col (current-column))) 1999 (o-col (current-column)))
2000 (goto-char (point-min)) 2000 (goto-char (point-min))
2001 (forward-line 1) 2001 (unless bookmark-bmenu-use-header-line
2002 (forward-line 1))
2002 (while (re-search-forward "^D" (point-max) t) 2003 (while (re-search-forward "^D" (point-max) t)
2003 (bookmark-delete (bookmark-bmenu-bookmark) t)) ; pass BATCH arg 2004 (bookmark-delete (bookmark-bmenu-bookmark) t)) ; pass BATCH arg
2004 (bookmark-bmenu-list) 2005 (bookmark-bmenu-list)
@@ -2186,8 +2187,7 @@ strings returned are not."
2186 "Save bookmark state, if necessary, at Emacs exit time. 2187 "Save bookmark state, if necessary, at Emacs exit time.
2187This also runs `bookmark-exit-hook'." 2188This also runs `bookmark-exit-hook'."
2188 (run-hooks 'bookmark-exit-hook) 2189 (run-hooks 'bookmark-exit-hook)
2189 (and bookmark-alist 2190 (and (bookmark-time-to-save-p t)
2190 (bookmark-time-to-save-p t)
2191 (bookmark-save))) 2191 (bookmark-save)))
2192 2192
2193(unless noninteractive 2193(unless noninteractive