Commit 241ab2b5 authored by Karl Fogel's avatar Karl Fogel
Browse files

* bookmark.el (bookmark-jump-other-window): New function.

  (bookmark-map): Bind it to "o".

Patch by Drew Adams <drew.adams{_AT_}oracle.com>.  See
http://lists.gnu.org/archive/html/emacs-devel/2007-07/msg00633.html.
parent d14c45f7
2007-07-13 Karl Fogel <kfogel@red-bean.com>
* bookmark.el (bookmark-jump-other-window): New function.
(bookmark-map): Bind it to "o".
Patch by Drew Adams <drew.adams{_AT_}oracle.com>. See
http://lists.gnu.org/archive/html/emacs-devel/2007-07/msg00633.html.
2007-07-13 Karl Fogel <kfogel@red-bean.com>
* bookmark.el: Shorten some comments to fit within 80 lines.
......
......@@ -241,6 +241,7 @@ functions have a binding in this keymap.")
;;;###autoload (define-key bookmark-map "m" 'bookmark-set) ;"m"ark
;;;###autoload (define-key bookmark-map "j" 'bookmark-jump)
;;;###autoload (define-key bookmark-map "g" 'bookmark-jump) ;"g"o
;;;###autoload (define-key bookmark-map "o" 'bookmark-jump-other-window)
;;;###autoload (define-key bookmark-map "i" 'bookmark-insert)
;;;###autoload (define-key bookmark-map "e" 'edit-bookmarks)
;;;###autoload (define-key bookmark-map "f" 'bookmark-insert-location) ;"f"ind
......@@ -1081,6 +1082,27 @@ of the old one in the permanent bookmark record."
(bookmark-show-annotation bookmark)))))
;;;###autoload
(defun bookmark-jump-other-window (bookmark)
"Jump to BOOKMARK (a point in some file) in another window.
See `bookmark-jump'."
(interactive
(let ((bkm (bookmark-completing-read "Jump to bookmark (in another window)"
bookmark-current-bookmark)))
(if (> emacs-major-version 21)
(list bkm) bkm)))
(when bookmark
(bookmark-maybe-historicize-string bookmark)
(let ((cell (bookmark-jump-noselect bookmark)))
(and cell
(switch-to-buffer-other-window (car cell))
(goto-char (cdr cell))
(if bookmark-automatically-show-annotations
;; if there is an annotation for this bookmark,
;; show it in a buffer.
(bookmark-show-annotation bookmark))))))
(defun bookmark-file-or-variation-thereof (file)
"Return FILE (a string) if it exists, or return a reasonable
variation of FILE if that exists. Reasonable variations are checked
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment