aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--etc/NEWS6
-rw-r--r--lisp/bookmark.el8
2 files changed, 14 insertions, 0 deletions
diff --git a/etc/NEWS b/etc/NEWS
index f74c17e4f36..fb69ffc49c2 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -1533,6 +1533,12 @@ This user option controls the width of the type column on the bookmark
1533menu 'bookmark-bmenu-list'. The default value is 8 which is backwards 1533menu 'bookmark-bmenu-list'. The default value is 8 which is backwards
1534compatible. 1534compatible.
1535 1535
1536---
1537*** New hook 'bookmark-after-load-file-hook'.
1538This hook is run by 'bookmark-load' after loading a bookmark file. This
1539hook can be used, for example, to reconcile 'bookmark-alist' against
1540bookmark state that you, or a package that you use, maintains.
1541
1536** Recentf 1542** Recentf
1537 1543
1538--- 1544---
diff --git a/lisp/bookmark.el b/lisp/bookmark.el
index 75071ddb9ce..f2a1c69929b 100644
--- a/lisp/bookmark.el
+++ b/lisp/bookmark.el
@@ -1763,6 +1763,13 @@ This is a helper for `bookmark-import-new-list'."
1763 (bookmark-set-name full-record new-name))))) 1763 (bookmark-set-name full-record new-name)))))
1764 1764
1765 1765
1766(defcustom bookmark-after-load-file-hook nil
1767 "Hook run after a bookmark file is loaded by `bookmark-load`.
1768This hook can be used, for example, to reconcile 'bookmark-alist'
1769against bookmark state that you, or a package that you use, maintains."
1770 :type 'hook
1771 :version "31.1")
1772
1766;;;###autoload 1773;;;###autoload
1767(defun bookmark-load (file &optional overwrite no-msg default) 1774(defun bookmark-load (file &optional overwrite no-msg default)
1768 "Load bookmarks from FILE (which must be in bookmark format). 1775 "Load bookmarks from FILE (which must be in bookmark format).
@@ -1824,6 +1831,7 @@ unique numeric suffixes \"<2>\", \"<3>\", etc."
1824 (bookmark-bmenu-surreptitiously-rebuild-list) 1831 (bookmark-bmenu-surreptitiously-rebuild-list)
1825 (setq bookmark-file-coding-system buffer-file-coding-system)) 1832 (setq bookmark-file-coding-system buffer-file-coding-system))
1826 (kill-buffer (current-buffer))) 1833 (kill-buffer (current-buffer)))
1834 (run-hooks 'bookmark-after-load-file-hook)
1827 (unless no-msg 1835 (unless no-msg
1828 (progress-reporter-done reporter))))) 1836 (progress-reporter-done reporter)))))
1829 1837