]> git.eshelyaron.com Git - emacs.git/commit
Add ability to mark/unmark/delete all bookmarks
authorMatthew White <mehw.is.me@inventati.org>
Thu, 23 Jul 2020 21:14:32 +0000 (21:14 +0000)
committerKarl Fogel <kfogel@red-bean.com>
Sun, 9 Aug 2020 20:13:05 +0000 (15:13 -0500)
commit450644e9f7923c30ef3d885638e69d3263bfa3a8
tree95a002dd65450671ce347f7d5ed24d12b4447947
parentb03b8d6e5567ae422bb357f39b32423615e7a36b
Add ability to mark/unmark/delete all bookmarks

Thanks to Karl Fogel for pre-commit review.

* lisp/bookmark.el (bookmark-delete-all): New function to delete all
  bookmarks.
  (bookmark-bmenu-mark-all): New function to mark all bookmarks in the
  bookmark list buffer.
  (bookmark-bmenu-unmark-all): New function to unmark all bookmarks in
  the bookmark list buffer.
  (bookmark-bmenu-delete-all): New function to mark for deletion all
  bookmarks in the bookmark list buffer.
  (bookmark-map): Map "D" to `bookmark-delete-all'.
  (bookmark-bmenu-mode-map): New mappping for "M" to
  `bookmark-bmenu-mark-all'.
  (bookmark-bmenu-mode-map): New mappping for "U" to
  `bookmark-bmenu-unmark-all'.
  (bookmark-bmenu-mode-map): New mappping for "D" to
  `bookmark-bmenu-delete-all'.
  (bookmark-bmenu-mark-all): New bookmark menu to
  `bookmark-delete-all'.
  (easy-menu-define): New bookmark menu to `bookmark-bmenu-mark-all'.
  (easy-menu-define): New bookmark menu to
  `bookmark-bmenu-unmark-all'.
  (easy-menu-define): New bookmark menu to
  `bookmark-bmenu-delete-all'.
  (bookmark-bmenu-select): Update docstring to include a reference to
  `bookmark-bmenu-mark-all'.
  (bookmark-bmenu-mode): Update docstring. Add/Update description:
  `bookmark-bmenu-mark-all', `bookmark-bmenu-delete-all',
  `bookmark-bmenu-execute-deletions', and `bookmark-bmenu-unmark-all'.
* test/lisp/bookmark-resources/test-list.bmk: New bookmark file to
  test a list of bookmarks.
* test/lisp/bookmark-tests.el (bookmark-tests-bookmark-file-list): New
  reference to the bookmark file used for testing a list of bookmarks.
  (bookmark-tests-bookmark-list-0, bookmark-tests-bookmark-list-1,
  bookmark-tests-bookmark-list-2): New cached values for testing a
  list of bookmark.
  (bookmark-tests-cache-timestamp-list): New variable to set
  `bookmark-bookmarks-timestamp'.
  (with-bookmark-test-list): New macro environment to test a list of
  bookmarks.
  (with-bookmark-test-file-list): New macro environment to test a list
  of bookmarks with example.txt.
  (with-bookmark-bmenu-test-list): New macro environment to test
  functions about a list of bookmarks from `bookmark-bmenu-list'.
  (bookmark-tests-all-names-list, bookmark-tests-get-bookmark-list,
  bookmark-tests-get-bookmark-record-list): New functions to test the
  records of the list of bookmarks.
  (bookmark-tests-make-record-list): New function to test the creation
  of a record from example.txt with a list of bookmarks loaded.
  (bookmark-tests-delete-all): New function to test
  `bookmark-delete-all'.
  (bookmark-test-bmenu-any-marks-list): New function to test
  `bookmark-bmenu-any-marks' with a list of bookmarks.
  (bookmark-test-bmenu-mark-all): New function to test
  `bookmark-bmenu-mark-all'.
  (bookmark-test-bmenu-unmark-all): New function to test
  `bookmark-bmenu-unmark-all'.
  (bookmark-test-bmenu-delete-all): New function to test
  `bookmark-bmenu-delete-all'.
lisp/bookmark.el
test/lisp/bookmark-resources/test-list.bmk [new file with mode: 0644]
test/lisp/bookmark-tests.el