diff -u bookmark.el bookmark-patched-2022-08-11.el
--- bookmark.el	2022-08-10 17:31:23.625030900 -0700
+++ bookmark-patched-2022-08-11.el	2022-08-11 13:55:59.012276700 -0700
@@ -265,34 +265,73 @@
 BOOKMARK-NAME is the name you gave to the bookmark when creating it.
 
 PARAM-ALIST is an alist of bookmark information.  The order of the
-entries in PARAM-ALIST is not important.  The default entries are
-described below.  An entry with a key but null value means the entry
-is not used.
+entries in PARAM-ALIST is not important.  An entry with a key but null
+value means the entry is not used - just as if the entry were absent.
+
+This is the set of entries available by default; their values are
+described below.
 
  (filename . FILENAME)
  (buf . BUFFER-OR-NAME)
  (position . POS)
  (front-context-string . STR-AFTER-POS)
  (rear-context-string  . STR-BEFORE-POS)
- (handler . HANDLER)
  (annotation . ANNOTATION)
+ (handler . HANDLER)
 
-FILENAME names the bookmarked file.
-BUFFER-OR-NAME is a buffer or the name of a buffer that is used
-  if FILENAME is not defined or it refers to a non-existent file.
-POS is the bookmarked buffer position.
-STR-AFTER-POS is buffer text that immediately follows POS.
-STR-BEFORE-POS is buffer text that immediately precedes POS.
-ANNOTATION is a string that describes the bookmark.
+All except `annotation' and `handler' are present by default in most
+bookmarks.  `annotation' is present only if a user gives the bookmark
+an annotation.  `handler' is typically absent, in which case the
+default handler, `bookmark-default-handler', is used.
+
+A bookmark record is typically created by the function that's
+currently the value of variable `bookmark-make-record-function'.  For
+a given type of bookmark, that function is responsible for defining
+the appropriate PARAM-ALIST.  Most `bookmark-make-record-function'
+uses don't specify a `handler'.
+
+* FILENAME names the bookmarked file.
+* BUFFER-OR-NAME is a buffer, or the name of a buffer, that's used if
+  FILENAME isn't defined or if it refers to a nonexistent file.
+* POS is the bookmarked buffer position.
+* STR-AFTER-POS is buffer text that immediately follows POS.
+* STR-BEFORE-POS is buffer text that immediately precedes POS.
+* ANNOTATION is a user-provided string associated with the bookmark.
   See options `bookmark-use-annotations' and
   `bookmark-automatically-show-annotations'.
-HANDLER is a function that provides the `bookmark-jump' behavior for a
-specific kind of bookmark instead of the default `bookmark-default-handler'.
-This is the case for Info bookmarks, for instance.  HANDLER must accept
-a bookmark as its single argument.
+* HANDLER is a function that provides the `bookmark-jump' behavior for a
+  specific kind of bookmark, replacing the default behavior provided
+  by `bookmark-default-handler'.  This is the case for Info bookmarks,
+  for instance.  HANDLER must accept a bookmark as its sole required
+  argument.
+
+  HANDLER is responsible for providing the bookmark's behavior: doing
+  everything the bookmark is meant to do.  This includes displaying
+  the bookmark destination, if that's needed (a bookmark need not
+  display anything; it can perform any action).
+
+  To display the destination, HANDLER can call the function that's the
+  value of variable `bookmark-jump-display-function', which is set by
+  `bookmark-jump' to automatically accommodate other-window etc.
+  displaying that depends on the jump command.  For example:
+
+   (funcall bookmark-jump-display-function (current-buffer))
+
+  Or HANDLER can directly call another display function.  For example:
+
+   (switch-to-buffer-other-tab BUFFER)
+
+  Or HANDLER can invoke `bookmark-default-handler'.  That displays the
+  destination.  It then moves to the recorded buffer position, POS,
+  repositioning point, if necessary, to match the recorded context
+  strings STR-BEFORE-POS and STR-AFTER-POS.  For instance, the Info
+  handler, `Info-bookmark-jump', does this at its end:
 
-A function `bookmark-make-record-function' may define additional entries
-in PARAM-LIST that can be used by HANDLER.")
+   (bookmark-default-handler
+    `("" (buffer . ,buf) . ,(bookmark-get-bookmark-record BOOKMARK)))
+
+  HANDLER can display the destination whenever that's most appropriate
+  - it can thus perform other actions before and after displaying.")
 
 (define-obsolete-variable-alias 'bookmarks-already-loaded
   'bookmark-bookmarks-timestamp "27.1")
@@ -1194,21 +1233,22 @@
          (bookmark-load (car bookmark-bookmarks-timestamp) t t))))
 
 
+(defvar bookmark-jump-display-function nil
+ "Function used currently to display a bookmark, or nil if no function.")
 
 (defvar bookmark-after-jump-hook nil
   "Hook run after `bookmark-jump' jumps to a bookmark.
 Useful for example to unhide text in `outline-mode'.")
 
 (defun bookmark--jump-via (bookmark-name-or-record display-function)
-  "Handle BOOKMARK-NAME-OR-RECORD, then call DISPLAY-FUNCTION.
-DISPLAY-FUNCTION is called with the current buffer as argument.
-
-After calling DISPLAY-FUNCTION, set window point to the point specified
-by BOOKMARK-NAME-OR-RECORD, if necessary, run `bookmark-after-jump-hook',
-and then show any annotations for this bookmark."
+  "Handle BOOKMARK-NAME-OR-RECORD, providing the bookmark's behavior.
+Save DISPLAY-FUNCTION in variable `bookmark-jump-display-function'.
+Then set the window point for the current buffer, if displayed, to
+point.  Then run `bookmark-after-jump-hook'.  Finally, if option
+`bookmark-automatically-show-annotations' is non-nil and the bookmark
+has an annotation, show the annotation."
+  (setq bookmark-jump-display-function  display-function)
   (bookmark-handle-bookmark bookmark-name-or-record)
-  (save-current-buffer
-    (funcall display-function (current-buffer)))
   (let ((win (get-buffer-window (current-buffer) 0)))
     (if win (set-window-point win (point))))
   ;; FIXME: we used to only run bookmark-after-jump-hook in
@@ -1337,11 +1377,12 @@
 
 If BMK-RECORD has a property called `buffer', it should be a live
 buffer object, and this buffer will be selected."
-  (let ((file          (bookmark-get-filename bmk-record))
-	(buf           (bookmark-prop-get bmk-record 'buffer))
-        (forward-str   (bookmark-get-front-context-string bmk-record))
-        (behind-str    (bookmark-get-rear-context-string bmk-record))
-        (place         (bookmark-get-position bmk-record)))
+  (let* ((bmk          (bookmark-get-bookmark bmk))
+         (file         (bookmark-get-filename bmk))
+	 (buf          (bookmark-prop-get bmk 'buffer))
+         (forward-str  (bookmark-get-front-context-string bmk))
+         (behind-str   (bookmark-get-rear-context-string bmk))
+         (place        (bookmark-get-position bmk)))
     (set-buffer
      (cond
       ((and file (file-readable-p file) (not (buffer-live-p buf)))
@@ -1350,6 +1391,9 @@
       ((and buf (get-buffer buf)))
       (t ;; If not, raise error.
        (signal 'bookmark-error-no-filename (list 'stringp file)))))
+    (when bookmark-jump-display-function
+      (save-current-buffer (funcall bookmark-jump-display-function
+                                    (current-buffer))))
     (if place (goto-char place))
     ;; Go searching forward first.  Then, if forward-str exists and
     ;; was found in the file, we can search backward for behind-str.
