aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKarl Fogel2007-07-13 18:20:55 +0000
committerKarl Fogel2007-07-13 18:20:55 +0000
commit241ab2b5f97c33e43ac73be9a170a2d4c6c1d8a6 (patch)
tree6e0d603dae5c0d694278a6f25ee9f20484bb7704
parentd14c45f7aaeef1b453131de8f9743d66484ccce4 (diff)
downloademacs-241ab2b5f97c33e43ac73be9a170a2d4c6c1d8a6.tar.gz
emacs-241ab2b5f97c33e43ac73be9a170a2d4c6c1d8a6.zip
* 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.
-rw-r--r--lisp/ChangeLog8
-rw-r--r--lisp/bookmark.el22
2 files changed, 30 insertions, 0 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 010b2db64c1..209174beddb 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,5 +1,13 @@
12007-07-13 Karl Fogel <kfogel@red-bean.com> 12007-07-13 Karl Fogel <kfogel@red-bean.com>
2 2
3 * bookmark.el (bookmark-jump-other-window): New function.
4 (bookmark-map): Bind it to "o".
5
6 Patch by Drew Adams <drew.adams{_AT_}oracle.com>. See
7 http://lists.gnu.org/archive/html/emacs-devel/2007-07/msg00633.html.
8
92007-07-13 Karl Fogel <kfogel@red-bean.com>
10
3 * bookmark.el: Shorten some comments to fit within 80 lines. 11 * bookmark.el: Shorten some comments to fit within 80 lines.
4 12
52007-07-13 Karl Fogel <kfogel@red-bean.com> 132007-07-13 Karl Fogel <kfogel@red-bean.com>
diff --git a/lisp/bookmark.el b/lisp/bookmark.el
index ba0f93854b3..6ef2ea198d3 100644
--- a/lisp/bookmark.el
+++ b/lisp/bookmark.el
@@ -241,6 +241,7 @@ functions have a binding in this keymap.")
241;;;###autoload (define-key bookmark-map "m" 'bookmark-set) ;"m"ark 241;;;###autoload (define-key bookmark-map "m" 'bookmark-set) ;"m"ark
242;;;###autoload (define-key bookmark-map "j" 'bookmark-jump) 242;;;###autoload (define-key bookmark-map "j" 'bookmark-jump)
243;;;###autoload (define-key bookmark-map "g" 'bookmark-jump) ;"g"o 243;;;###autoload (define-key bookmark-map "g" 'bookmark-jump) ;"g"o
244;;;###autoload (define-key bookmark-map "o" 'bookmark-jump-other-window)
244;;;###autoload (define-key bookmark-map "i" 'bookmark-insert) 245;;;###autoload (define-key bookmark-map "i" 'bookmark-insert)
245;;;###autoload (define-key bookmark-map "e" 'edit-bookmarks) 246;;;###autoload (define-key bookmark-map "e" 'edit-bookmarks)
246;;;###autoload (define-key bookmark-map "f" 'bookmark-insert-location) ;"f"ind 247;;;###autoload (define-key bookmark-map "f" 'bookmark-insert-location) ;"f"ind
@@ -1081,6 +1082,27 @@ of the old one in the permanent bookmark record."
1081 (bookmark-show-annotation bookmark))))) 1082 (bookmark-show-annotation bookmark)))))
1082 1083
1083 1084
1085;;;###autoload
1086(defun bookmark-jump-other-window (bookmark)
1087 "Jump to BOOKMARK (a point in some file) in another window.
1088See `bookmark-jump'."
1089 (interactive
1090 (let ((bkm (bookmark-completing-read "Jump to bookmark (in another window)"
1091 bookmark-current-bookmark)))
1092 (if (> emacs-major-version 21)
1093 (list bkm) bkm)))
1094 (when bookmark
1095 (bookmark-maybe-historicize-string bookmark)
1096 (let ((cell (bookmark-jump-noselect bookmark)))
1097 (and cell
1098 (switch-to-buffer-other-window (car cell))
1099 (goto-char (cdr cell))
1100 (if bookmark-automatically-show-annotations
1101 ;; if there is an annotation for this bookmark,
1102 ;; show it in a buffer.
1103 (bookmark-show-annotation bookmark))))))
1104
1105
1084(defun bookmark-file-or-variation-thereof (file) 1106(defun bookmark-file-or-variation-thereof (file)
1085 "Return FILE (a string) if it exists, or return a reasonable 1107 "Return FILE (a string) if it exists, or return a reasonable
1086variation of FILE if that exists. Reasonable variations are checked 1108variation of FILE if that exists. Reasonable variations are checked