Function: bookmark-bmenu-execute-deletions
bookmark-bmenu-execute-deletions is an interactive and byte-compiled
function defined in bookmark.el.gz.
Signature
(bookmark-bmenu-execute-deletions)
Documentation
Delete bookmarks flagged D.
If bookmark-menu-confirm-deletion is non-nil, prompt for
confirmation first.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/bookmark.el.gz
(defun bookmark-bmenu-execute-deletions ()
"Delete bookmarks flagged `D'.
If `bookmark-menu-confirm-deletion' is non-nil, prompt for
confirmation first."
(interactive nil bookmark-bmenu-mode)
(if (and bookmark-menu-confirm-deletion
(not (yes-or-no-p "Delete selected bookmarks? ")))
(message "Bookmarks not deleted.")
(let ((reporter (make-progress-reporter "Deleting bookmarks..."))
(o-point (point))
(o-str (save-excursion
(beginning-of-line)
(unless (= (following-char) ?D)
(buffer-substring
(point)
(progn (end-of-line) (point))))))
(o-col (current-column)))
(goto-char (point-min))
(while (re-search-forward "^D" (point-max) t)
(bookmark-delete (bookmark-bmenu-bookmark) t)) ; pass BATCH arg
(bookmark-bmenu-list)
(if o-str
(progn
(goto-char (point-min))
(search-forward o-str)
(beginning-of-line)
(forward-char o-col))
(goto-char o-point))
(beginning-of-line)
(progress-reporter-done reporter))))