Function: bookmark-delete
bookmark-delete is an autoloaded, interactive and byte-compiled
function defined in bookmark.el.gz.
Signature
(bookmark-delete BOOKMARK-NAME &optional BATCH)
Documentation
Delete BOOKMARK-NAME from the bookmark list.
Removes only the first instance of a bookmark with that name. If there are one or more other bookmarks with the same name, they will not be deleted. Defaults to the "current" bookmark (that is, the one most recently used in this file, if any). Optional second arg BATCH means don't update the bookmark list buffer, probably because we were called from there.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/bookmark.el.gz
;;;###autoload
(defun bookmark-delete (bookmark-name &optional batch)
"Delete BOOKMARK-NAME from the bookmark list.
Removes only the first instance of a bookmark with that name. If
there are one or more other bookmarks with the same name, they will
not be deleted. Defaults to the \"current\" bookmark (that is, the
one most recently used in this file, if any).
Optional second arg BATCH means don't update the bookmark list buffer,
probably because we were called from there."
(interactive
(list (bookmark-completing-read "Delete bookmark"
bookmark-current-bookmark)))
(bookmark-maybe-historicize-string bookmark-name)
(bookmark-maybe-load-default-file)
(let ((will-go (bookmark-get-bookmark bookmark-name 'noerror)))
(bookmark--remove-fringe-mark will-go)
(setq bookmark-alist (delq will-go bookmark-alist))
;; Added by db, nil bookmark-current-bookmark if the last
;; occurrence has been deleted
(or (bookmark-get-bookmark bookmark-current-bookmark 'noerror)
(setq bookmark-current-bookmark nil)))
(unless batch
(bookmark-bmenu-surreptitiously-rebuild-list))
(setq bookmark-alist-modification-count
(1+ bookmark-alist-modification-count))
(when (bookmark-time-to-save-p)
(bookmark-save)))