New org capture template
[emacs.git] / .emacs.d / elisp / icicle / bookmark+-key.el
1 ;;; bookmark+-key.el --- Bookmark+ key and menu bindings.
2 ;;
3 ;; Filename: bookmark+-key.el
4 ;; Description: Bookmark+ key and menu bindings.
5 ;; Author: Drew Adams
6 ;; Maintainer: Drew Adams (concat "drew.adams" "@" "oracle" ".com")
7 ;; Copyright (C) 2010-2012, Drew Adams, all rights reserved.
8 ;; Created: Fri Apr 1 15:34:50 2011 (-0700)
9 ;; Version:
10 ;; Last-Updated: Sun Mar 4 14:57:25 2012 (-0800)
11 ;; By: dradams
12 ;; Update #: 564
13 ;; URL: http://www.emacswiki.org/cgi-bin/wiki/bookmark+-key.el
14 ;; Keywords: bookmarks, bookmark+, placeholders, annotations, search, info, url, w3m, gnus
15 ;; Compatibility: GNU Emacs: 20.x, 21.x, 22.x, 23.x
16 ;;
17 ;; Features that might be required by this library:
18 ;;
19 ;; None
20 ;;
21 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
22 ;;
23 ;;; Commentary:
24 ;;
25 ;; The Bookmark+ libraries are these:
26 ;;
27 ;; `bookmark+.el' - main (driver) library
28 ;; `bookmark+-mac.el' - Lisp macros
29 ;; `bookmark+-lit.el' - (optional) code for highlighting bookmarks
30 ;; `bookmark+-bmu.el' - code for the `*Bookmark List*' (bmenu)
31 ;; `bookmark+-1.el' - other (non-bmenu) required code
32 ;; `bookmark+-key.el' - key and menu bindings (this file)
33 ;;
34 ;; `bookmark+-doc.el' - documentation (comment-only file)
35 ;; `bookmark+-chg.el' - change log (comment-only file)
36 ;;
37 ;; The documentation (in `bookmark+-doc.el') includes how to
38 ;; byte-compile and install Bookmark+. The documentation is also
39 ;; available in these ways:
40 ;;
41 ;; 1. From the bookmark list (`C-x r l'):
42 ;; Use `?' to show the current bookmark-list status and general
43 ;; help, then click link `Doc in Commentary' or link `Doc on the
44 ;; Web'.
45 ;;
46 ;; 2. From the Emacs-Wiki Web site:
47 ;; http://www.emacswiki.org/cgi-bin/wiki/BookmarkPlus.
48 ;;
49 ;; 3. From the Bookmark+ group customization buffer:
50 ;; `M-x customize-group bookmark-plus', then click link
51 ;; `Commentary'.
52 ;;
53 ;; (The commentary links in #1 and #3 work only if you have library
54 ;; `bookmark+-doc.el' in your `load-path'.)
55 ;;
56 ;;
57 ;; Internal variables defined here:
58 ;;
59 ;; `bmkp-find-file-menu', `bmkp-highlight-menu', `bmkp-jump-map',
60 ;; `bmkp-jump-menu', `bmkp-options-menu',
61 ;; `bmkp-jump-other-window-map', `bmkp-jump-tags-menu',
62 ;; `bmkp-set-map', `bmkp-tags-map', `bmkp-tags-menu'.
63 ;;
64 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
65 ;;
66 ;; *This program is free software; you can redistribute it and/or
67 ;; modify it under the terms of the GNU General Public License as
68 ;; published by the Free Software Foundation; either version 3, or
69 ;; (at your option) any later version.
70 ;;
71 ;; This program is distributed in the hope that it will be useful,
72 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
73 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
74 ;; General Public License for more details.
75 ;;
76 ;; You should have received a copy of the GNU General Public License
77 ;; along with this program; see the file COPYING. If not, write to
78 ;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth
79 ;; Floor, Boston, MA 02110-1301, USA.
80 ;;
81 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
82 ;;
83 ;;; Code:
84
85 ;;;;;;;;;;;;;;;;;;;;;
86
87
88 ;; Some general Renamings.
89 ;;
90 ;; 1. Fix incompatibility introduced by gratuitous Emacs name change.
91 ;;
92 (cond ((and (fboundp 'bookmark-name-from-record) (not (fboundp 'bookmark-name-from-full-record)))
93 (defalias 'bookmark-name-from-full-record 'bookmark-name-from-record))
94 ((and (fboundp 'bookmark-name-from-full-record) (not (fboundp 'bookmark-name-from-record)))
95 (defalias 'bookmark-name-from-record 'bookmark-name-from-full-record)))
96
97 ;; 2. The vanilla name of the first is misleading, as it returns only the cdr of the record.
98 ;; The second is for consistency.
99 ;;
100 (defalias 'bmkp-bookmark-data-from-record 'bookmark-get-bookmark-record)
101 (defalias 'bmkp-bookmark-name-from-record 'bookmark-name-from-full-record)
102
103
104 ;; Quiet the byte-compiler
105 (defvar bmkp-bmenu-menubar-menu) ; Defined in `bookmark+-bmu.el'.
106 (defvar bmkp-crosshairs-flag) ; Defined in `bookmark+-1.el'.
107 (defvar bmkp-prompt-for-tags-flag) ; Defined in `bookmark+-1.el'.
108 (defvar bmkp-save-new-location-flag) ; Defined in `bookmark+-1.el'.
109 (defvar diredp-menu-bar-subdir-menu) ; Defined in `dired+.el'.
110 (defvar gnus-summary-mode-map) ; Defined in `gnus-sum.el'.
111 (defvar Info-mode-map) ; Defined in `info.el'.
112 (defvar Info-mode-menu) ; Defined in `info.el'.
113 (defvar Man-mode-map) ; Defined in `man.el'.
114 (defvar mouse-wheel-down-event) ; Defined in `mwheel.el'.
115 (defvar mouse-wheel-up-event) ; Defined in `mwheel.el'.
116 (defvar w3m-minor-mode-map) ; Defined in `w3m.el'.
117 (defvar w3m-mode-map) ; Defined in `w3m.el'.
118 (defvar woman-menu) ; Defined in `woman.el'.
119 (defvar woman-mode-map) ; Defined in `woman.el'.
120
121 ;;(@* "Keymaps")
122 ;;; Keymaps ----------------------------------------------------------
123
124 ;; `bookmark-map'
125
126 (define-key ctl-x-map "p" bookmark-map)
127 (define-key ctl-x-map "pj" 'bookmark-jump-other-window) ; `C-x p j' (also `C-x 4 j j')
128 (define-key ctl-x-map "rK" 'bmkp-set-desktop-bookmark) ; `C-x r K' (also `C-x p K', `C-x p c K')
129 (define-key bookmark-map "0" 'bmkp-empty-file) ; `C-x p 0'
130 (define-key bookmark-map "B" 'bmkp-choose-navlist-from-bookmark-list) ; `C-x p B'
131 ;; `e' is `edit-bookmarks' (aka `bookmark-bmenu-list', from vanilla Emacs.
132 (define-key bookmark-map "E" 'bmkp-edit-bookmark-record) ; `C-x p E'
133 ;; The original `bookmark-insert-location' in `bookmark.el' was `f'.
134 (define-key bookmark-map "I" 'bookmark-insert-location) ; `C-x p I'
135 (define-key bookmark-map "K" 'bmkp-set-desktop-bookmark) ; `C-x p K' (also `C-x r K', `C-x p c K')
136 (define-key bookmark-map "L" 'bmkp-switch-bookmark-file-create) ; `C-x p L'
137 (define-key bookmark-map "N" 'bmkp-navlist-bmenu-list) ; `C-x p N'
138 (define-key bookmark-map "o" 'bookmark-jump-other-window) ; `C-x p o' (also `C-x 4 j j')
139 (define-key bookmark-map "q" 'bookmark-jump-other-window) ; `C-x p q' (also `C-x 4 j j')
140 (define-key bookmark-map "r" 'bmkp-edit-bookmark-name-and-file) ; `C-x p r'
141 (define-key bookmark-map "x" 'bmkp-toggle-autotemp-on-set) ; `C-x p x'
142 (define-key bookmark-map "y" 'bmkp-set-bookmark-file-bookmark) ; `C-x p y'
143 (when (featurep 'bookmark+-lit)
144 (define-key bookmark-map "h" 'bmkp-light-bookmark-this-buffer) ; `C-x p h'
145 (define-key bookmark-map "H" 'bmkp-light-bookmarks) ; `C-x p H'
146 (define-key bookmark-map "u" 'bmkp-unlight-bookmark-this-buffer) ; `C-x p u'
147 (define-key bookmark-map "U" 'bmkp-unlight-bookmarks) ; `C-x p U'
148 (define-key bookmark-map "\C-u" 'bmkp-unlight-bookmark-here) ; `C-x p C-u'
149 (define-key bookmark-map "=" 'bmkp-bookmarks-lighted-at-point)) ; `C-x p ='
150 (define-key bookmark-map "," 'bmkp-this-file/buffer-bmenu-list) ; `C-x p ,'
151 (define-key bookmark-map "?" 'bmkp-describe-bookmark) ; `C-x p ?'
152 (define-key bookmark-map ":" 'bmkp-choose-navlist-of-type) ; `C-x p :'
153 (define-key bookmark-map "\r" 'bmkp-toggle-autonamed-bookmark-set/delete) ; `C-x p RET'
154 (define-key bookmark-map [delete] 'bmkp-delete-bookmarks) ; `C-x p delete'
155
156 ;; If you use Emacs before Emacs 22, then you will want to bind the commands
157 ;; whose names do *not* end in `-repeat' to keys that are easily repeatable.
158 ;; For example, you might want to bind `bmkp-next-bookmark-this-file/buffer'
159 ;; (not `bmkp-next-bookmark-this-file/buffer-repeat') to a key such as [f2].
160 ;;
161 (when (> emacs-major-version 21)
162 (define-key bookmark-map [down] 'bmkp-next-bookmark-this-file/buffer-repeat) ; `C-x p down'
163 (define-key bookmark-map "n" 'bmkp-next-bookmark-this-file/buffer-repeat) ; `C-x p n'
164 (define-key bookmark-map "\C-n" 'bmkp-next-bookmark-this-file/buffer-repeat) ; `C-x p C-n'
165
166 ;; This requires the fix for Emacs bug #6256, which is in Emacs 23.3 (presumably).
167 ;; For older Emacs versions you can bind the wheel event to `bmkp-next-bookmark-this-file/buffer'
168 ;; in the global map. IOW, prior to Emacs 23.3 a mouse event won't work with `repeat'.
169 (when (and (boundp 'mouse-wheel-up-event)
170 (or (> emacs-major-version 23)
171 (and (= emacs-major-version 23) (> emacs-minor-version 2))))
172 (define-key bookmark-map (vector (list mouse-wheel-up-event))
173 'bmkp-next-bookmark-this-file/buffer-repeat)) ; `C-x p mouse-wheel-up'
174 (define-key bookmark-map [up] 'bmkp-previous-bookmark-this-file/buffer-repeat) ; `C-x p up'
175 (define-key bookmark-map "p" 'bmkp-previous-bookmark-this-file/buffer-repeat) ; `C-x p p'
176 (define-key bookmark-map "\C-p" 'bmkp-previous-bookmark-this-file/buffer-repeat) ; `C-x p C-p'
177
178 ;; This requires the fix for Emacs bug #6256, which is in Emacs 23.3 (presumably).
179 ;; For older Emacs versions you can bind the wheel event to `bmkp-previous-bookmark-this-file/buffer'
180 ;; in the global map. IOW, prior to Emacs 23.3 a mouse event won't work with `repeat'.
181 (when (and (boundp 'mouse-wheel-down-event)
182 (or (> emacs-major-version 23)
183 (and (= emacs-major-version 23) (> emacs-minor-version 2))))
184 (define-key bookmark-map (vector (list mouse-wheel-down-event))
185 'bmkp-previous-bookmark-this-file/buffer-repeat)) ; `C-x p mouse-wheel-down'
186 (define-key bookmark-map [right] 'bmkp-next-bookmark-repeat) ; `C-x p right'
187 (define-key bookmark-map "f" 'bmkp-next-bookmark-repeat) ; `C-x p f'
188 (define-key bookmark-map "\C-f" 'bmkp-next-bookmark-repeat) ; `C-x p C-f'
189 (define-key bookmark-map [left] 'bmkp-previous-bookmark-repeat) ; `C-x p left'
190 (define-key bookmark-map "b" 'bmkp-previous-bookmark-repeat) ; `C-x p b'
191 (define-key bookmark-map "\C-b" 'bmkp-previous-bookmark-repeat) ; `C-x p C-b'
192 (define-key bookmark-map [next] 'bmkp-next-bookmark-w32-repeat) ; `C-x p next'
193 (define-key bookmark-map [prior] 'bmkp-previous-bookmark-w32-repeat) ; `C-x p prior'
194 (when (featurep 'bookmark+-lit)
195 (define-key bookmark-map [C-down] 'bmkp-next-lighted-this-buffer-repeat) ; `C-x p C-down'
196 (define-key bookmark-map [C-up] 'bmkp-previous-lighted-this-buffer-repeat))) ; `C-x p C-up'
197
198
199 ;; `bmkp-set-map': prefix `C-x p c'
200
201 (defvar bmkp-set-map nil "Keymap containing bindings for bookmark set commands.")
202
203 (define-prefix-command 'bmkp-set-map)
204 (define-key bookmark-map "c" bmkp-set-map) ; `C-x p c' for create
205
206 (define-key bmkp-set-map "a" 'bmkp-autofile-set) ; `C-x p c a'
207 (define-key bmkp-set-map "f" 'bmkp-file-target-set) ; `C-x p c f'
208 (define-key bmkp-set-map "K" 'bmkp-set-desktop-bookmark) ; `C-x p c K'
209 (define-key bmkp-set-map "m" 'bookmark-set) ; `C-x p c m'
210 (define-key bmkp-set-map "u" 'bmkp-url-target-set) ; `C-x p c u'
211 (define-key bmkp-set-map "y" 'bmkp-set-bookmark-file-bookmark) ; `C-x p c y'
212 (define-key bmkp-set-map "\r" 'bmkp-toggle-autonamed-bookmark-set/delete) ; `C-x p c RET'
213
214
215 ;; Add set commands to other keymaps: occur, compilation: `C-c C-b', `C-c C-M-b', `C-c C-M-B'.
216 ;; See `dired+.el' for Dired bookmarking keys, which are different.
217
218 (add-hook 'occur-mode-hook
219 #'(lambda ()
220 (unless (lookup-key occur-mode-map "\C-c\C-b")
221 (define-key occur-mode-map "\C-c\C-b" 'bmkp-occur-target-set)) ; `C-c C-b'
222 (unless (lookup-key occur-mode-map "\C-c\C-\M-b")
223 (define-key occur-mode-map "\C-c\C-\M-b" 'bmkp-occur-target-set-all)) ; `C-c C-M-b'
224 (unless (lookup-key occur-mode-map [(control ?c) (control meta shift ?b)])
225 (define-key occur-mode-map [(control ?c) (control meta shift ?b)]
226 'bmkp-occur-create-autonamed-bookmarks)))) ; `C-c C-M-B' (aka `C-c C-M-S-b')
227
228 (add-hook 'compilation-mode-hook
229 #'(lambda ()
230 (unless (lookup-key occur-mode-map "\C-c\C-b")
231 (define-key occur-mode-map "\C-c\C-b" 'bmkp-compilation-target-set)) ; `C-c C-b'
232 (unless (lookup-key occur-mode-map "\C-c\C-\M-b") ; `C-c C-M-b'
233 (define-key occur-mode-map "\C-c\C-\M-b" 'bmkp-compilation-target-set-all))))
234
235 (add-hook 'compilation-minor-mode-hook
236 #'(lambda ()
237 (unless (lookup-key occur-mode-map "\C-c\C-b")
238 (define-key occur-mode-map "\C-c\C-b" 'bmkp-compilation-target-set)) ; `C-c C-b'
239 (unless (lookup-key occur-mode-map "\C-c\C-\M-b") ; `C-c C-M-b'
240 (define-key occur-mode-map "\C-c\C-\M-b" 'bmkp-compilation-target-set-all))))
241
242
243 ;; `bmkp-tags-map': prefix `C-x p t'
244
245 (defvar bmkp-tags-map nil "Keymap containing bindings for bookmark tag commands.")
246
247 (define-prefix-command 'bmkp-tags-map)
248 (define-key bookmark-map "t" bmkp-tags-map) ; `C-x p t' for tags
249
250 (define-key bmkp-tags-map "0" 'bmkp-remove-all-tags) ; `C-x p t 0'
251 (define-key bmkp-tags-map "+" nil) ; For Emacs 20
252 (define-key bmkp-tags-map "+b" 'bmkp-add-tags) ; `C-x p t + b'
253 (define-key bmkp-tags-map "-b" 'bmkp-remove-tags) ; `C-x p t - b'
254 (define-key bmkp-tags-map "+a" 'bmkp-tag-a-file) ; `C-x p t + a'
255 (define-key bmkp-tags-map "-a" 'bmkp-untag-a-file) ; `C-x p t - a'
256 (define-key bmkp-tags-map "c" 'bmkp-copy-tags) ; `C-x p t c'
257 (define-key bmkp-tags-map "d" 'bmkp-remove-tags-from-all) ; `C-x p t d'
258 (define-key bmkp-tags-map "e" 'bmkp-edit-tags) ; `C-x p t e'
259 (define-key bmkp-tags-map "l" 'bmkp-list-all-tags) ; `C-x p t l'
260 (define-key bmkp-tags-map "p" 'bmkp-paste-add-tags) ; `C-x p t p'
261 (define-key bmkp-tags-map "q" 'bmkp-paste-replace-tags) ; `C-x p t q'
262 (define-key bmkp-tags-map "r" 'bmkp-rename-tag) ; `C-x p t r'
263 (define-key bmkp-tags-map "v" 'bmkp-set-tag-value) ; `C-x p t v'
264 (define-key bmkp-tags-map "V" 'bmkp-set-tag-value-for-navlist) ; `C-x p t V'
265 (define-key bmkp-tags-map "\M-w" 'bmkp-copy-tags) ; `C-x p t M-w'
266 (define-key bmkp-tags-map "\C-y" 'bmkp-paste-add-tags) ; `C-x p t C-y'
267
268
269 ;; `bmkp-jump-map' and `bmkp-jump-other-window-map': prefixes `C-x j' and `C-x 4 j'
270
271 (defvar bmkp-jump-map nil "Keymap containing bindings for bookmark jump commands.")
272
273 (defvar bmkp-jump-other-window-map nil
274 "Keymap containing bindings for bookmark jump other-window commands.")
275
276 (define-prefix-command 'bmkp-jump-map)
277 (define-prefix-command 'bmkp-jump-other-window-map)
278 (define-key ctl-x-map "j" bmkp-jump-map)
279 (define-key ctl-x-4-map "j" bmkp-jump-other-window-map)
280
281 (define-key bmkp-jump-map "." nil) ; For Emacs 20
282 (define-key bmkp-jump-other-window-map "." nil) ; For Emacs 20
283 (define-key bmkp-jump-map ".d" 'bmkp-dired-this-dir-jump) ; `C-x j . d'
284 (define-key bmkp-jump-other-window-map ".d" 'bmkp-dired-this-dir-jump-other-window) ; `C-x 4 j . d'
285 (define-key bmkp-jump-map ".f" 'bmkp-file-this-dir-jump) ; `C-x j . f'
286 (define-key bmkp-jump-other-window-map ".f" 'bmkp-file-this-dir-jump-other-window) ; `C-x 4 j . f'
287
288 (define-key bmkp-jump-map "," nil) ; For Emacs 20
289 (define-key bmkp-jump-other-window-map "," nil) ; For Emacs 20
290 (define-key bmkp-jump-map ",," 'bmkp-this-buffer-jump) ; `C-x j , ,'
291 (define-key bmkp-jump-other-window-map ",," 'bmkp-this-buffer-jump-other-window) ; `C-x 4 j , ,'
292 (define-key bmkp-jump-map ",#" 'bmkp-autonamed-this-buffer-jump) ; `C-x j , #'
293 (define-key bmkp-jump-other-window-map ",#"
294 'bmkp-autonamed-this-buffer-jump-other-window) ; `C-x 4 j , #'
295
296 (define-key bmkp-jump-map "#" 'bmkp-autonamed-jump) ; `C-x j #'
297 (define-key bmkp-jump-other-window-map "#" 'bmkp-autonamed-jump-other-window) ; `C-x 4 j #'
298
299 (define-key bmkp-jump-map "=" nil) ; For Emacs 20
300 (define-key bmkp-jump-other-window-map "=" nil) ; For Emacs 20
301 (define-key bmkp-jump-map "=b" 'bmkp-specific-buffers-jump) ; `C-x j = b'
302 (define-key bmkp-jump-other-window-map "=b" 'bmkp-specific-buffers-jump-other-window) ; `C-x 4 j = b'
303 (define-key bmkp-jump-map "=f" 'bmkp-specific-files-jump) ; `C-x j = f'
304 (define-key bmkp-jump-other-window-map "=f" 'bmkp-specific-files-jump-other-window) ; `C-x 4 j = f'
305
306 (define-key bmkp-jump-map "a" 'bmkp-autofile-jump) ; `C-x j a'
307 (define-key bmkp-jump-other-window-map "a" 'bmkp-autofile-jump-other-window) ; `C-x 4 j a'
308 (define-key bmkp-jump-map "b" 'bmkp-non-file-jump) ; `C-x j b'
309 (define-key bmkp-jump-other-window-map "b" 'bmkp-non-file-jump-other-window) ; `C-x 4 j b'
310 (define-key bmkp-jump-map "B" 'bmkp-bookmark-list-jump) ; `C-x j B'
311 (define-key bmkp-jump-other-window-map "B" 'bmkp-bookmark-list-jump) ; SAME
312 (define-key bmkp-jump-map "d" 'bmkp-dired-jump) ; `C-x j d'
313 (define-key bmkp-jump-other-window-map "d" 'bmkp-dired-jump-other-window) ; `C-x 4 j d'
314 (define-key bmkp-jump-map "f" 'bmkp-file-jump) ; `C-x j f'
315 (define-key bmkp-jump-other-window-map "f" 'bmkp-file-jump-other-window) ; `C-x 4 j f'
316 (define-key bmkp-jump-map "\C-f" 'bmkp-find-file) ; `C-x j C-f'
317 (define-key bmkp-jump-other-window-map "\C-f" 'bmkp-find-file-other-window) ; `C-x 4 j C-f'
318 (define-key bmkp-jump-map "g" 'bmkp-gnus-jump) ; `C-x j g'
319 (define-key bmkp-jump-other-window-map "g" 'bmkp-gnus-jump-other-window) ; `C-x 4 j g'
320 (define-key bmkp-jump-map "h" 'bmkp-lighted-jump) ; `C-x j h'
321 (define-key bmkp-jump-other-window-map "h" 'bmkp-lighted-jump-other-window) ; `C-x 4 j h'
322 (define-key bmkp-jump-map "i" 'bmkp-info-jump) ; `C-x j i'
323 (define-key bmkp-jump-other-window-map "i" 'bmkp-info-jump-other-window) ; `C-x 4 j i'
324 (define-key bmkp-jump-map "\M-i" 'bmkp-image-jump) ; `C-x j M-i'
325 (define-key bmkp-jump-other-window-map "\M-i" 'bmkp-image-jump-other-window) ; `C-x 4 j M-i'
326 (define-key bmkp-jump-map "j" 'bookmark-jump) ; `C-x j j'
327 (put 'bookmark-jump :advertised-binding "\C-xjj")
328
329 (define-key bmkp-jump-other-window-map "j" 'bookmark-jump-other-window) ; `C-x 4 j j'
330 (put 'bookmark-jump-other-window :advertised-binding "\C-x4jj")
331 (put 'jump-other :advertised-binding "\C-x4jj")
332
333 (define-key bmkp-jump-map "K" 'bmkp-desktop-jump) ; `C-x j K'
334 (define-key bmkp-jump-other-window-map "K" 'bmkp-desktop-jump) ; SAME
335 (define-key bmkp-jump-map "l" 'bmkp-local-file-jump) ; `C-x j l'
336 (define-key bmkp-jump-other-window-map "l" 'bmkp-local-file-jump-other-window) ; `C-x 4 j l'
337 (define-key bmkp-jump-map "m" 'bmkp-man-jump) ; `C-x j m'
338 (define-key bmkp-jump-other-window-map "m" 'bmkp-man-jump-other-window) ; `C-x 4 j m'
339 (define-key bmkp-jump-map "n" 'bmkp-remote-file-jump) ; `C-x j n' ("_n_etwork")
340 (define-key bmkp-jump-other-window-map "n" 'bmkp-remote-file-jump-other-window) ; `C-x 4 j n'
341 (define-key bmkp-jump-map "N" 'bmkp-jump-in-navlist) ; `C-x j N'
342 (define-key bmkp-jump-other-window-map "N" 'bmkp-jump-in-navlist-other-window) ; `C-x 4 j N'
343 (define-key bmkp-jump-map "r" 'bmkp-region-jump) ; `C-x j r'
344 (define-key bmkp-jump-other-window-map "r" 'bmkp-region-jump-other-window) ; `C-x 4 j r'
345
346 (define-key bmkp-jump-map "t" nil) ; For Emacs 20
347 (define-key bmkp-jump-other-window-map "t" nil) ; For Emacs 20
348 (define-key bmkp-jump-map "t*" 'bmkp-all-tags-jump) ; `C-x j t *'
349 (define-key bmkp-jump-other-window-map "t*" 'bmkp-all-tags-jump-other-window) ; `C-x 4 j t *'
350 (define-key bmkp-jump-map "t+" 'bmkp-some-tags-jump) ; `C-x j t +'
351 (define-key bmkp-jump-other-window-map "t+" 'bmkp-some-tags-jump-other-window) ; `C-x 4 j t +'
352
353 (define-key bmkp-jump-map "t%" nil) ; For Emacs 20
354 (define-key bmkp-jump-other-window-map "t%" nil) ; For Emacs 20
355 (define-key bmkp-jump-map "t%*" 'bmkp-all-tags-regexp-jump) ; `C-x j t % *'
356 (define-key bmkp-jump-other-window-map "t%*"
357 'bmkp-all-tags-regexp-jump-other-window) ; `C-x 4 j t % *'
358 (define-key bmkp-jump-map "t%+" 'bmkp-some-tags-regexp-jump) ; `C-x j t % +'
359 (define-key bmkp-jump-other-window-map "t%+"
360 'bmkp-some-tags-regexp-jump-other-window) ; `C-x 4 j t % +'
361
362 (define-key bmkp-jump-map "t." nil) ; For Emacs 20
363 (define-key bmkp-jump-other-window-map "t." nil) ; For Emacs 20
364 (define-key bmkp-jump-map "t.*" 'bmkp-file-this-dir-all-tags-jump) ; `C-x j t . *'
365 (define-key bmkp-jump-other-window-map "t.*"
366 'bmkp-file-this-dir-all-tags-jump-other-window) ; `C-x 4 j t . *'
367 (define-key bmkp-jump-map "t.+" 'bmkp-file-this-dir-some-tags-jump) ; `C-x j t . +'
368 (define-key bmkp-jump-other-window-map "t.+"
369 'bmkp-file-this-dir-some-tags-jump-other-window) ; `C-x 4 j t . +'
370
371 (define-key bmkp-jump-map "t.%" nil) ; For Emacs 20
372 (define-key bmkp-jump-other-window-map "t.%" nil) ; For Emacs 20
373 (define-key bmkp-jump-map "t.%*"
374 'bmkp-file-this-dir-all-tags-regexp-jump) ; `C-x j t . % *'
375 (define-key bmkp-jump-other-window-map "t.%*"
376 'bmkp-file-this-dir-all-tags-regexp-jump-other-window) ; `C-x 4 j t . % *'
377 (define-key bmkp-jump-map "t.%+"
378 'bmkp-file-this-dir-some-tags-regexp-jump) ; `C-x j t . % +'
379 (define-key bmkp-jump-other-window-map "t.%+"
380 'bmkp-file-this-dir-some-tags-regexp-jump-other-window) ; `C-x 4 j t . % +'
381
382
383 (define-key bmkp-jump-map "ta" nil) ; For Emacs 20
384 (define-key bmkp-jump-other-window-map "ta" nil) ; For Emacs 20
385 (define-key bmkp-jump-map "ta*" 'bmkp-autofile-all-tags-jump) ; `C-x j t a *'
386 (define-key bmkp-jump-other-window-map "ta*"
387 'bmkp-autofile-all-tags-jump-other-window) ; `C-x 4 j t a *'
388 (define-key bmkp-jump-map "ta+" 'bmkp-autofile-some-tags-jump) ; `C-x j t a +'
389 (define-key bmkp-jump-other-window-map "ta+"
390 'bmkp-autofile-some-tags-jump-other-window) ; `C-x 4 j t a +'
391
392 (define-key bmkp-jump-map "ta%" nil) ; For Emacs 20
393 (define-key bmkp-jump-other-window-map "ta%" nil) ; For Emacs 20
394 (define-key bmkp-jump-map "ta%*" 'bmkp-autofile-all-tags-regexp-jump) ; `C-x j t a % *'
395 (define-key bmkp-jump-other-window-map "ta%*"
396 'bmkp-autofile-all-tags-regexp-jump-other-window) ; `C-x 4 j t a % *'
397 (define-key bmkp-jump-map "ta%+" 'bmkp-autofile-some-tags-regexp-jump) ; `C-x j t a % +'
398 (define-key bmkp-jump-other-window-map "ta%+"
399 'bmkp-autofile-some-tags-regexp-jump-other-window) ; `C-x 4 j t a % +'
400
401 (define-key bmkp-jump-map "tf" nil) ; For Emacs 20
402 (define-key bmkp-jump-other-window-map "tf" nil) ; For Emacs 20
403 (define-key bmkp-jump-map "tf*" 'bmkp-file-all-tags-jump) ; `C-x j t f *'
404 (define-key bmkp-jump-other-window-map "tf*" 'bmkp-file-all-tags-jump-other-window) ; `C-x 4 j t f *'
405 (define-key bmkp-jump-map "tf+" 'bmkp-file-some-tags-jump) ; `C-x j t f +'
406 (define-key bmkp-jump-other-window-map "tf+" 'bmkp-file-some-tags-jump-other-window) ; `C-x 4 j t f +'
407
408 (define-key bmkp-jump-map "tf%" nil) ; For Emacs 20
409 (define-key bmkp-jump-other-window-map "tf%" nil) ; For Emacs 20
410 (define-key bmkp-jump-map "tf%*" 'bmkp-file-all-tags-regexp-jump) ; `C-x j t f % *'
411 (define-key bmkp-jump-other-window-map "tf%*"
412 'bmkp-file-all-tags-regexp-jump-other-window) ; `C-x 4 j t f % *'
413 (define-key bmkp-jump-map "tf%+" 'bmkp-file-some-tags-regexp-jump) ; `C-x j t f % +'
414 (define-key bmkp-jump-other-window-map "tf%+"
415 'bmkp-file-some-tags-regexp-jump-other-window) ; `C-x 4 j t f % +'
416
417 (when (> emacs-major-version 21) ; Needs `read-file-name' with a PREDICATE arg.
418 (define-key bmkp-jump-map "t\C-f*" 'bmkp-find-file-all-tags) ; `C-x j t C-f *'
419 (define-key bmkp-jump-other-window-map "t\C-f*"
420 'bmkp-find-file-all-tags-other-window) ; `C-x 4 j t C-f *'
421 (define-key bmkp-jump-map "t\C-f+" 'bmkp-find-file-some-tags) ; `C-x j t C-f +'
422 (define-key bmkp-jump-other-window-map "t\C-f+"
423 'bmkp-find-file-some-tags-other-window) ; `C-x 4 j t C-f +'
424 (define-key bmkp-jump-map "t\C-f%*" 'bmkp-find-file-all-tags-regexp) ; `C-x j t C-f % *'
425 (define-key bmkp-jump-other-window-map "t\C-f%*"
426 'bmkp-find-file-all-tags-regexp-other-window) ; `C-x 4 j t C-f % *'
427 (define-key bmkp-jump-map "t\C-f%+"
428 'bmkp-find-file-some-tags-regexp) ; `C-x j t C-f % +'
429 (define-key bmkp-jump-other-window-map "t\C-f%+"
430 'bmkp-find-file-some-tags-regexp-other-window)) ; `C-x 4 j t C-f % +'
431
432 (define-key bmkp-jump-map "u" 'bmkp-url-jump) ; `C-x j u'
433 (define-key bmkp-jump-other-window-map "u" 'bmkp-url-jump-other-window) ; `C-x 4 j u'
434 (define-key bmkp-jump-map "v" 'bmkp-variable-list-jump) ; `C-x j v'
435 (define-key bmkp-jump-map "w" 'bmkp-w3m-jump) ; `C-x j w'
436 (define-key bmkp-jump-other-window-map "w" 'bmkp-w3m-jump-other-window) ; `C-x 4 j w'
437 (define-key bmkp-jump-map "x" 'bmkp-temporary-jump) ; `C-x j x'
438 (define-key bmkp-jump-other-window-map "x" 'bmkp-temporary-jump-other-window) ; `C-x 4 j x'
439 (define-key bmkp-jump-map "y" 'bmkp-bookmark-file-jump) ; `C-x j y'
440 (define-key bmkp-jump-map ":" 'bmkp-jump-to-type) ; `C-x j :'
441 (define-key bmkp-jump-other-window-map ":" 'bmkp-jump-to-type-other-window) ; `C-x 4 j :'
442
443 ;; Add jump commands to other keymaps: Buffer-menu, Dired, Gnus, Info, Man, Woman, W3M.
444 (add-hook 'buffer-menu-mode-hook
445 #'(lambda () (unless (lookup-key Buffer-menu-mode-map "j")
446 (define-key Buffer-menu-mode-map "j" 'bmkp-non-file-jump)))) ; `j'
447 (add-hook 'dired-mode-hook
448 #'(lambda ()
449 (let ((now (lookup-key dired-mode-map "J")))
450 ;; Uppercase, since `j' is `dired-goto-file'.
451 (unless (and now (not (eq now 'undefined))) ; `dired+.el' uses `undefined'.
452 (define-key dired-mode-map "J" 'bmkp-dired-jump)) ; `j'
453 (setq now (lookup-key dired-mode-map "\C-j"))
454 (unless (and now (not (eq now 'undefined))) ; `dired+.el' uses `undefined'.
455 (define-key dired-mode-map "\C-j" 'bmkp-dired-this-dir-jump))) ; `C-j'
456 (let ((map dired-mode-map)
457 (sep '(menu-bar subdir separator-bmkp))
458 (bdj '(menu-bar subdir bmkp-dired-jump))
459 (bdjc '(menu-bar subdir bmkp-dired-this-dir-jump)))
460 (when (boundp 'diredp-menu-bar-subdir-menu) ; In `dired+el'.
461 (setq map diredp-menu-bar-subdir-menu
462 sep (cddr sep)
463 bdj (cddr bdj)
464 bdjc (cddr bdjc)))
465 (define-key map (apply #'vector sep) '("--")) ;-------------------------------------
466 (define-key map (apply #'vector bdj)
467 '(menu-item "Jump to a Dired Bookmark" bmkp-dired-jump
468 :help "Jump to a bookmarked Dired buffer"))
469 (define-key map (apply #'vector bdjc)
470 '(menu-item "Show This Dir Using a Bookmark" bmkp-dired-this-dir-jump
471 :help "Use a bookmarked version of this directory")))))
472 (add-hook 'gnus-summary-mode-hook
473 #'(lambda () (unless (lookup-key gnus-summary-mode-map "j")
474 (define-key gnus-summary-mode-map "j" 'bmkp-gnus-jump))))
475 (add-hook 'Info-mode-hook
476 #'(lambda ()
477 (unless (lookup-key Info-mode-map "j")
478 (define-key Info-mode-map "j" 'bmkp-info-jump))
479 (define-key-after Info-mode-menu [bmkp-info-jump]
480 '(menu-item "Jump to an Info Bookmark" bmkp-info-jump
481 :help "Jump to a bookmarked Info node")
482 'Go\ to\ Node\.\.\.))) ; Used by `info(+).el' - corresponds to `Info-goto-node'.
483 (add-hook 'Man-mode-hook
484 #'(lambda () (unless (lookup-key Man-mode-map "j")
485 (define-key Man-mode-map "j" 'bmkp-man-jump))))
486 (add-hook 'woman-mode-hook
487 #'(lambda ()
488 (unless (lookup-key woman-mode-map "j") (define-key woman-mode-map "j" 'bmkp-man-jump))
489 (when (boundp 'woman-menu)
490 (define-key-after woman-menu [bmkp-man-jump]
491 '(menu-item "Jump to a `man'-page Bookmark" bmkp-man-jump
492 :help "Jump to a bookmarked `man' page")
493 'WoMan\.\.\.)))) ; Used by `woman.el' - corresponds to command `woman'.
494 (add-hook 'w3m-minor-mode-hook
495 #'(lambda () (unless (lookup-key w3m-minor-mode-map "j")
496 (define-key w3m-minor-mode-map "j" 'bmkp-w3m-jump))))
497 (add-hook 'w3m-mode-hook
498 #'(lambda () (unless (lookup-key w3m-mode-map "j")
499 (define-key w3m-mode-map "j" 'bmkp-w3m-jump))))
500
501
502 ;;; Vanilla Emacs `Bookmarks' menu (see also [jump] from `Bookmark+' menu, below).
503
504 (define-key-after menu-bar-bookmark-map [separator-set] '("--") 'jump) ;----------------------------
505 (define-key-after menu-bar-bookmark-map [set]
506 '(menu-item "Set Bookmark..." (lambda () (interactive) (call-interactively #'bookmark-set))
507 :help "Set a bookmark at point" :keys "C-x p m")
508 'separator-set)
509 (define-key-after menu-bar-bookmark-map [bmkp-autofile-set]
510 '(menu-item "Set Autofile Bookmark..." bmkp-autofile-set
511 :help "Set and automatically name a bookmark for a given file")
512 'set)
513 (define-key-after menu-bar-bookmark-map [bmkp-file-target-set]
514 '(menu-item "Set Bookmark for File..." bmkp-file-target-set
515 :help "Set a bookmark with a given name for a given file")
516 'bmkp-autofile-set)
517 (define-key-after menu-bar-bookmark-map [bmkp-url-target-set]
518 '(menu-item "Set Bookmark for URL..." bmkp-url-target-set
519 :help "Set a bookmark for a given URL")
520 'bmkp-file-target-set)
521 (define-key-after menu-bar-bookmark-map [bmkp-set-desktop-bookmark]
522 '(menu-item "Set Bookmark for Desktop" bmkp-set-desktop-bookmark
523 :help "Save the current desktop as a bookmark")
524 'bmkp-url-target-set)
525 (define-key-after menu-bar-bookmark-map [bmkp-set-bookmark-file-bookmark]
526 '(menu-item "Set Bookmark for Bookmark File..." bmkp-set-bookmark-file-bookmark
527 :help "Set a bookmark that loads a bookmark file when jumped to")
528 'bmkp-set-desktop-bookmark)
529 (define-key-after menu-bar-bookmark-map [bmkp-toggle-autoname-bookmark-set]
530 '(menu-item "Set Autonamed Bookmark" bmkp-toggle-autonamed-bookmark-set/delete
531 :help "Set an autonamed bookmark at point"
532 :visible (not (bmkp-get-bookmark-in-alist (funcall bmkp-autoname-bookmark-function (point))
533 'noerror)))
534 'bmkp-set-bookmark-file-bookmark)
535
536 (define-key-after menu-bar-bookmark-map [separator-delete] '("--") ;--------------------------------
537 'bmkp-toggle-autoname-bookmark-set)
538 (define-key-after menu-bar-bookmark-map [bmkp-delete-all-temporary-bookmarks]
539 '(menu-item "Delete All Temporaries..." bmkp-delete-all-temporary-bookmarks
540 :help "Delete the temporary bookmarks, (`X') whether visible here or not")
541 'separator-delete)
542
543 ;;; $$$$$$ NOTE: Here and below, the definitions with logically correct `:enable' filters are
544 ;;; commented out. This is because evaluation of these filters is too slow, especially
545 ;;; in older Emacs versions. If you want to try some or all of the definitions with the
546 ;;; `:enable' conditions, just uncomment them and comment out or remove the corresponding
547 ;;; definitions without such conditions.
548
549 ;;;;; (define-key-after menu-bar-bookmark-map [bmkp-delete-all-autonamed-for-this-buffer]
550 ;;;;; '(menu-item "Delete All Autonamed Bookmarks Here..."
551 ;;;;; bmkp-delete-all-autonamed-for-this-buffer
552 ;;;;; :help "Delete all autonamed bookmarks for the current buffer"
553 ;;;;; :enable (mapcar #'bmkp-bookmark-name-from-record (bmkp-autonamed-this-buffer-alist-only)))
554 ;;;;; 'bmkp-delete-all-temporary-bookmarks)
555 (define-key-after menu-bar-bookmark-map [bmkp-delete-all-autonamed-for-this-buffer]
556 '(menu-item "Delete All Autonamed Bookmarks Here..."
557 bmkp-delete-all-autonamed-for-this-buffer
558 :help "Delete all autonamed bookmarks for the current buffer")
559 'bmkp-delete-all-temporary-bookmarks)
560 (define-key-after menu-bar-bookmark-map [bmkp-toggle-autoname-bookmark-delete]
561 '(menu-item "Delete Autonamed Bookmark" bmkp-toggle-autonamed-bookmark-set/delete
562 :help "Delete the autonamed bookmark at point"
563 :visible (bmkp-get-bookmark-in-alist (funcall bmkp-autoname-bookmark-function (point))
564 'noerror))
565 'bmkp-toggle-autonamed-bookmark-set/delete)
566 ;;;;; (define-key-after menu-bar-bookmark-map [bmkp-delete-bookmarks]
567 ;;;;; '(menu-item "Delete Bookmarks Here..." bmkp-delete-bookmarks
568 ;;;;; :help "Delete some bookmarks at point or, with `C-u', all bookmarks in the buffer"
569 ;;;;; :enable (mapcar #'bmkp-bookmark-name-from-record (bmkp-this-buffer-alist-only)))
570 ;;;;; 'bmkp-delete-all-autonamed-for-this-buffer)
571 (define-key-after menu-bar-bookmark-map [bmkp-delete-bookmarks]
572 '(menu-item "Delete Bookmarks Here..." bmkp-delete-bookmarks
573 :help "Delete some bookmarks at point or, with `C-u', all bookmarks in the buffer")
574 'bmkp-delete-all-autonamed-for-this-buffer)
575 (define-key-after menu-bar-bookmark-map [delete]
576 '(menu-item "Delete Bookmark..." bookmark-delete :help "Delete the bookmark you choose by name")
577 'bmkp-delete-bookmarks)
578 (define-key-after menu-bar-bookmark-map [bmkp-purge-notags-autofiles]
579 '(menu-item "Purge Autofiles with No Tags..." bmkp-purge-notags-autofiles
580 :help "Delete all autofile bookmarks that have no tags")
581 'delete)
582
583 (define-key-after menu-bar-bookmark-map [separator-edit] '("--") ;-------------------------------------
584 'bmkp-purge-notags-autofiles)
585 ;; Remove this predefined item - we use `bmkp-edit-bookmark-name-and-file' instead.
586 (define-key menu-bar-bookmark-map [rename] nil)
587
588 (define-key-after menu-bar-bookmark-map [bmkp-edit-bookmark-name-and-file]
589 '(menu-item "Rename or Relocate Bookmark..." bmkp-edit-bookmark-name-and-file
590 :help "Rename and/or relocate a bookmark")
591 'separator-edit)
592 (define-key-after menu-bar-bookmark-map [bmkp-edit-bookmark-record]
593 '(menu-item "Edit Bookmark Record (Lisp)..." bmkp-edit-bookmark-record
594 :help "Edit the internal record of a bookmark,a Lisp sexp")
595 'bmkp-edit-bookmark-name-and-file)
596
597 (define-key-after menu-bar-bookmark-map [separator-show] '("--") ;-------------------------------------
598 'bmkp-edit-bookmark-record)
599 (define-key-after menu-bar-bookmark-map [edit]
600 '(menu-item "Show Bookmark List" bookmark-bmenu-list
601 :help "Open the list of bookmarks in buffer `*Bookmark List*'")
602 'separator-show)
603 ;;;;; (define-key-after menu-bar-bookmark-map [bmkp-this-file/buffer-bmenu-list]
604 ;;;;; '(menu-item "Show Bookmark List for This File/Buffer" bmkp-this-buffer-file/bmenu-list
605 ;;;;; :help "Open `*Bookmark List*' for the bookmarks in the current file or buffer (only)"
606 ;;;;; :enable (mapcar #'bmkp-bookmark-name-from-record (bmkp-this-file/buffer-alist-only)))
607 ;;;;; 'edit)
608 (define-key-after menu-bar-bookmark-map [bmkp-this-file/buffer-bmenu-list]
609 '(menu-item "Show Bookmark List for This File/Buffer" bmkp-this-buffer-file/bmenu-list
610 :help "Open `*Bookmark List*' for the bookmarks in the current file or buffer (only)")
611 'edit)
612 (define-key-after menu-bar-bookmark-map [bmkp-navlist-bmenu-list]
613 '(menu-item "Show Bookmark List for Navlist" bmkp-navlist-bmenu-list
614 :help "Open `*Bookmark List*' for bookmarks in navlist (only)")
615 'bmkp-this-file/buffer-bmenu-list)
616
617 (define-key-after menu-bar-bookmark-map [separator-2] '("--") ;-------------------------------------
618 'bmkp-navlist-bmenu-list)
619 (define-key-after menu-bar-bookmark-map [bmkp-choose-navlist-of-type]
620 '(menu-item "Set Navlist to Bookmarks of Type..." bmkp-choose-navlist-of-type
621 :help "Set the navigation list to the bookmarks of a certain type")
622 'separator-2)
623 (define-key-after menu-bar-bookmark-map [bmkp-choose-navlist-from-bookmark-list]
624 '(menu-item "Set Navlist from Bookmark-List Bookmark..." bmkp-choose-navlist-from-bookmark-list
625 :help "Set the navigation list from a bookmark-list bookmark")
626 'bmkp-choose-navlist-of-type)
627 (define-key-after menu-bar-bookmark-map [bmkp-list-defuns-in-commands-file]
628 '(menu-item "List User-Defined Bookmark Commands" bmkp-list-defuns-in-commands-file
629 :help "List the functions defined in `bmkp-bmenu-commands-file'"
630 :enable (and bmkp-bmenu-commands-file (file-readable-p bmkp-bmenu-commands-file)))
631 'bmkp-choose-navlist-from-bookmark-list)
632 (define-key-after menu-bar-bookmark-map [bmkp-make-function-bookmark]
633 '(menu-item "New Function Bookmark..." bmkp-make-function-bookmark
634 :help "Create a bookmark that will invoke FUNCTION when \"jumped\" to")
635 'bmkp-list-defuns-in-commands-file)
636
637 (define-key-after menu-bar-bookmark-map [insert]
638 '(menu-item "Insert Bookmark Contents..." bookmark-insert :help "Insert bookmarked text")
639 'bmkp-make-function-bookmark)
640 (define-key-after menu-bar-bookmark-map [locate]
641 '(menu-item "Insert Bookmark Location..." bookmark-locate ; Alias for `bookmark-insert-location'.
642 :help "Insert a bookmark's file or buffer name")
643 'insert)
644
645 (define-key-after menu-bar-bookmark-map [separator-3] '("--") ;-------------------------------------
646 'locate)
647 (define-key-after menu-bar-bookmark-map [save]
648 '(menu-item "Save Bookmarks" bookmark-save :help "Save currently defined bookmarks")
649 'separator-3)
650 (define-key-after menu-bar-bookmark-map [write]
651 '(menu-item "Save Bookmarks As..." bookmark-write
652 :help "Write current bookmarks to a bookmark file")
653 'save)
654 (define-key-after menu-bar-bookmark-map [bmkp-switch-bookmark-file-create]
655 '(menu-item "Switch to Bookmark File..." bmkp-switch-bookmark-file-create
656 :help "Switch to a different bookmark file, *replacing* the current set of bookmarks")
657 'write)
658 (define-key-after menu-bar-bookmark-map [load]
659 '(menu-item "Add Bookmarks from File..." bookmark-load
660 :help "Load additional bookmarks from a bookmark file")
661 'bmkp-switch-bookmark-file-create)
662 (define-key-after menu-bar-bookmark-map [bmkp-empty-file]
663 '(menu-item "Empty Bookmark File..." bmkp-empty-file
664 :help "Empty an existing bookmark file or create a new, empty bookmark file")
665 'load)
666 (define-key-after menu-bar-bookmark-map [bmkp-toggle-autotemp-on-set]
667 '(menu-item "Toggle Automatically Making Temporary" bmkp-toggle-autotemp-on-set
668 :help "Toggle automatically making any bookmark temporary whenever it is set")
669 'bmkp-empty-file)
670 (define-key-after menu-bar-bookmark-map [bmkp-temporary-bookmarking-mode]
671 '(menu-item "Toggle Temporary Bookmarking Mode..." bmkp-temporary-bookmarking-mode
672 :help "Toggle temporary-only bookmarking (empty bookmark file *replaces* current bookmarks)")
673 'bmkp-toggle-autotemp-on-set)
674
675
676 ;; `bmkp-highlight-menu' of vanilla `Bookmarks' menu: `Highlight'
677
678 (when (featurep 'bookmark+-lit)
679 (defvar bmkp-highlight-menu (make-sparse-keymap)
680 "`Highlight' submenu for menu-bar `Bookmarks' menu.")
681 (define-key menu-bar-bookmark-map [highlight] (cons "Highlight" bmkp-highlight-menu))
682
683 (define-key bmkp-highlight-menu [bmkp-unlight-bookmarks]
684 '(menu-item "Unhighlight All" bmkp-unlight-bookmarks
685 :help "Unhighlight all bookmarks (everywhere)."))
686 (define-key bmkp-highlight-menu [bmkp-unlight-this-buffer]
687 '(menu-item "Unhighlight All in Buffer" bmkp-unlight-this-buffer
688 :help "Unhighlight all bookmarks in this buffer."))
689 (define-key bmkp-highlight-menu [bmkp-unlight-non-autonamed-this-buffer]
690 '(menu-item "Unhighlight All Non-Autonamed in Buffer" bmkp-unlight-non-autonamed-this-buffer
691 :help "Unhighlight all non-autonamed bookmarks in this buffer."))
692 (define-key bmkp-highlight-menu [bmkp-unlight-autonamed-this-buffer]
693 '(menu-item "Unhighlight All Autonamed in Buffer" bmkp-unlight-autonamed-this-buffer
694 :help "Unhighlight all autonamed bookmarks in this buffer."))
695 (define-key bmkp-highlight-menu [bmkp-unlight-bookmark]
696 '(menu-item "Unhighlight One..." bmkp-unlight-bookmark
697 :help "Unhighlight a bookmark."))
698 (define-key bmkp-highlight-menu [bmkp-unlight-bookmark-this-buffer]
699 '(menu-item "Unhighlight One in Buffer..." bmkp-unlight-bookmark-this-buffer
700 :help "Unhighlight a bookmark in this buffer."))
701 (define-key bmkp-highlight-menu [bmkp-unlight-bookmark-here]
702 '(menu-item "Unhighlight This One" bmkp-unlight-bookmark-here
703 :help "Unhighlight a bookmark at point or on its line."))
704
705 (define-key bmkp-highlight-menu [separator-1] '("--")) ;------------------------------------------
706 (define-key bmkp-highlight-menu [bmkp-light-bookmarks-in-region]
707 '(menu-item "Highlight All in Region" bmkp-light-bookmarks-in-region
708 :help "Highlight all bookmarks in the region."))
709 (define-key bmkp-highlight-menu [bmkp-light-this-buffer]
710 '(menu-item "Highlight All in Buffer" bmkp-light-this-buffer
711 :help "Highlight all bookmarks in this buffer."))
712 (define-key bmkp-highlight-menu [bmkp-light-non-autonamed-this-buffer]
713 '(menu-item "Highlight All Non-Autonamed in Buffer" bmkp-light-non-autonamed-this-buffer
714 :help "Highlight all non-autonamed bookmarks in this buffer."))
715 (define-key bmkp-highlight-menu [bmkp-light-autonamed-this-buffer]
716 '(menu-item "Highlight All Autonamed in Buffer" bmkp-light-autonamed-this-buffer
717 :help "Highlight all autonamed bookmarks in this buffer."))
718 (define-key bmkp-highlight-menu [bmkp-light-navlist-bookmarks]
719 '(menu-item "Highlight All in Navigation List" bmkp-light-navlist-bookmarks
720 :help "Highlight all bookmarks in the navigation list."))
721 (define-key bmkp-highlight-menu [bmkp-light-bookmark-this-buffer]
722 '(menu-item "Highlight One in Buffer..." bmkp-light-bookmark-this-buffer
723 :help "Highlight a bookmark in this buffer."))
724 (define-key bmkp-highlight-menu [bmkp-light-bookmark]
725 '(menu-item "Highlight One..." bmkp-light-bookmark
726 :help "Highlight a bookmark."))
727
728 (define-key bmkp-highlight-menu [separator-0] '("--")) ;------------------------------------------
729 (define-key bmkp-highlight-menu [bmkp-next-lighted-this-buffer]
730 '(menu-item "Next in Buffer" bmkp-next-lighted-this-buffer
731 :help "Cycle to the next highlighted bookmark in this buffer."))
732 (define-key bmkp-highlight-menu [bmkp-previous-lighted-this-buffer]
733 '(menu-item "Previous in Buffer" bmkp-previous-lighted-this-buffer
734 :help "Cycle to the previous highlighted bookmark in this buffer."))
735 (define-key bmkp-highlight-menu [bmkp-bookmarks-lighted-at-point]
736 '(menu-item "List Highlighted at Point" bmkp-bookmarks-lighted-at-point
737 :help "List the bookmarks at point that are highlighted."))
738 (define-key bmkp-highlight-menu [bmkp-set-lighting-for-bookmark]
739 '(menu-item "Set Highlighting for One..." bmkp-set-lighting-for-bookmark
740 :help "Set individual highlighting for a bookmark.")))
741
742
743 ;; `bmkp-options-menu' of vanilla `Bookmarks' menu: `Toggle Option'
744
745 (defvar bmkp-options-menu (make-sparse-keymap)
746 "`Toggle Option' submenu for menu-bar `Bookmarks' menu.")
747 (define-key menu-bar-bookmark-map [options] (cons "Toggle Option" bmkp-options-menu))
748
749 (define-key bmkp-options-menu [bmkp-crosshairs-flag]
750 (bmkp-menu-bar-make-toggle bmkp-crosshairs-flag bmkp-crosshairs-flag
751 "Highlight Jump using Crosshairs"
752 "Crosshairs highlighting is %s"
753 "Temporarily highlight visited bookmarks using crosshairs"))
754 (define-key bmkp-options-menu [bmkp-toggle-saving-menu-list-state]
755 (bmkp-menu-bar-make-toggle bmkp-bmenu-state-file bmkp-bmenu-state-file
756 "Autosave *Bookmark List* Display State"
757 "Autosaving of `*Bookmark List*' display state is %s"
758 "Autosave `*Bookmark List*' display state when you quit it"))
759 (define-key bmkp-options-menu [bmkp-toggle-saving-bookmark-file]
760 (bmkp-menu-bar-make-toggle bookmark-save-flag bookmark-save-flag
761 "Autosave Bookmark File"
762 "Autosaving of bookmarks is %s"
763 "Automatically save a bookmark after setting or changing it"))
764 (define-key bmkp-options-menu [bmkp-save-new-location-flag]
765 (bmkp-menu-bar-make-toggle bmkp-save-new-location-flag bmkp-save-new-location-flag
766 "Autosave after Relocating"
767 "Autosaving relocated bookmarks is %s"
768 "Automatically save a bookmark after automatically relocating it"))
769 (define-key bmkp-options-menu [bmkp-prompt-for-tags-flag]
770 (bmkp-menu-bar-make-toggle bmkp-prompt-for-tags-flag bmkp-prompt-for-tags-flag
771 "Prompt for Tags when Setting"
772 "Prompting for tags when setting a bookmark is %s"
773 "Prompt for tags when setting a bookmark interactively"))
774
775 ;; `bmkp-tags-menu' of vanilla `Bookmarks' menu: `Tags'
776
777 (defvar bmkp-tags-menu (make-sparse-keymap)
778 "`Tags' submenu for menu-bar `Bookmarks' menu.")
779 (define-key menu-bar-bookmark-map [tags] (cons "Tags" bmkp-tags-menu))
780
781 (define-key bmkp-tags-menu [bmkp-list-all-tags]
782 '(menu-item "List All Tags" bmkp-list-all-tags :help "List all tags used for any bookmarks"))
783 (define-key bmkp-tags-menu [bmkp-purge-notags-autofiles]
784 '(menu-item "Purge Autofiles with No Tags..." bmkp-purge-notags-autofiles
785 :help "Delete all autofile bookmarks that have no tags"))
786 (define-key bmkp-tags-menu [bmkp-untag-a-file]
787 '(menu-item "Untag a File (Remove Some)..." bmkp-untag-a-file
788 :help "Remove some tags from autofile bookmark for a file"))
789 (define-key bmkp-tags-menu [bmkp-tag-a-file]
790 '(menu-item "Tag a File (Add Some)..." bmkp-tag-a-file
791 :help "Add some tags to the autofile bookmark for a file"))
792
793 (define-key bmkp-tags-menu [tags-sep1] '("--")) ;----------------------------------------------
794 (define-key bmkp-tags-menu [bmkp-rename-tag]
795 '(menu-item "Rename Tag..." bmkp-rename-tag :help "Rename a tag in all bookmarks"))
796 (define-key bmkp-tags-menu [bmkp-set-tag-value]
797 '(menu-item "Set Tag Value..." bmkp-set-tag-value :help "Set the tag value for a given bookmark"))
798 (define-key bmkp-tags-menu [bmkp-remove-tags-from-all]
799 '(menu-item "Remove Some Tags from All..." bmkp-remove-tags-from-all
800 :help "Remove a set of tags from all bookmarks"))
801 (define-key bmkp-tags-menu [bmkp-remove-tags]
802 '(menu-item "Remove Some Tags..." bmkp-remove-tags :help "Remove a set of tags from a bookmark"))
803 (define-key bmkp-tags-menu [bmkp-add-tags]
804 '(menu-item "Add Some Tags..." bmkp-add-tags :help "Add a set of tags to a bookmark"))
805 (define-key bmkp-tags-menu [bmkp-paste-replace-tags]
806 '(menu-item "Paste Tags (Replace)..." bmkp-paste-replace-tags
807 :help "Replace tags for a bookmark with tags copied from another"))
808 (define-key bmkp-tags-menu [bmkp-paste-add-tags]
809 '(menu-item "Paste Tags (Add)..." bmkp-paste-add-tags
810 :help "Add tags to a bookmark that were previously copied from another"))
811 (define-key bmkp-tags-menu [bmkp-copy-tags]
812 '(menu-item "Copy Tags..." bmkp-copy-tags
813 :help "Copy the tags from a bookmark, so you can paste them to another"))
814 (define-key bmkp-tags-menu [bmkp-edit-tags]
815 '(menu-item "Edit Tags..." bmkp-edit-tags :help "Edit the tags of a bookmark"))
816
817 ;; `bmkp-jump-menu' of vanilla `Bookmarks' menu: `Jump To'
818
819 (defvar bmkp-jump-menu (make-sparse-keymap)
820 "`Jump To' submenu for menu-bar `Bookmarks' menu.")
821 ;; Add jump menu to vanilla Emacs `Bookmarks' menu and remove the two jump commands already there.
822 (define-key menu-bar-bookmark-map [jump] nil)
823 (define-key menu-bar-bookmark-map [jump-other] nil)
824 (define-key menu-bar-bookmark-map [bmkp-jump] (cons "Jump To" bmkp-jump-menu))
825
826 ;; `Jump To': Add jump menu also to the `Bookmark+' menu, and remove the two jump commands there.
827 (define-key bmkp-bmenu-menubar-menu [jump] (cons "Jump To" bmkp-jump-menu))
828
829 (define-key bmkp-jump-menu [bmkp-temporary-jump-other-window]
830 '(menu-item "Temporary..." bmkp-temporary-jump-other-window
831 :help "Jump to a temporary bookmark"))
832 (define-key bmkp-jump-menu [bmkp-autofile-jump-other-window]
833 '(menu-item "Autofile..." bmkp-autofile-jump-other-window
834 :help "Jump to an autofile bookmark"))
835 (define-key bmkp-jump-menu [bmkp-autonamed-this-buffer-jump]
836 '(menu-item "Autonamed for This Buffer..." bmkp-autonamed-this-buffer-jump
837 :help "Jump to an autonamed bookmark in this buffer"))
838 (define-key bmkp-jump-menu [bmkp-autonamed-jump-other-window]
839 '(menu-item "Autonamed..." bmkp-autonamed-jump-other-window
840 :help "Jump to an autonamed bookmark"))
841 (define-key bmkp-jump-menu [bmkp-specific-files-jump-other-window]
842 '(menu-item "For Specific Files..." bmkp-specific-files-jump-other-window
843 :help "Jump to a bookmark for specific files"))
844 (define-key bmkp-jump-menu [bmkp-specific-buffers-jump-other-window]
845 '(menu-item "For Specific Buffers..." bmkp-specific-buffers-jump-other-window
846 :help "Jump to a bookmark for specific buffers"))
847 ;;;;; (define-key bmkp-jump-menu [bmkp-this-buffer-jump]
848 ;;;;; '(menu-item "For This Buffer..." bmkp-this-buffer-jump
849 ;;;;; :help "Jump to a bookmark for the current buffer"
850 ;;;;; :enable (mapcar #'bmkp-bookmark-name-from-record (bmkp-this-buffer-alist-only))))
851 (define-key bmkp-jump-menu [bmkp-this-buffer-jump]
852 '(menu-item "For This Buffer..." bmkp-this-buffer-jump
853 :help "Jump to a bookmark for the current buffer"))
854 ;;;;; (when (featurep 'bookmark+-lit)
855 ;;;;; (define-key bmkp-jump-menu [bmkp-lighted-jump-other-window]
856 ;;;;; '(menu-item "Highlighted..." bmkp-lighted-jump-other-window
857 ;;;;; :help "Jump to a highlighted bookmark"
858 ;;;;; :enable (bmkp-lighted-alist-only))))
859 (when (featurep 'bookmark+-lit)
860 (define-key bmkp-jump-menu [bmkp-lighted-jump-other-window]
861 '(menu-item "Highlighted..." bmkp-lighted-jump-other-window
862 :help "Jump to a highlighted bookmark")))
863 (define-key bmkp-jump-menu [bmkp-jump-in-navlist-other-window]
864 '(menu-item "In Navigation List..." bmkp-jump-in-navlist-other-window
865 :help "Jump to a bookmark that is in the navigation list" :enable bmkp-nav-alist))
866
867 (define-key bmkp-jump-menu [jump-sep0] '("--")) ;---------------------------------------------------
868 ;;;;; (define-key bmkp-jump-menu [bmkp-url-jump-other-window]
869 ;;;;; '(menu-item "URL..." bmkp-url-jump-other-window :help "Jump to a URL bookmark"
870 ;;;;; :enable (bmkp-url-alist-only)))
871 (define-key bmkp-jump-menu [bmkp-url-jump-other-window]
872 '(menu-item "URL..." bmkp-url-jump-other-window :help "Jump to a URL bookmark"))
873 ;;;;; (define-key bmkp-jump-menu [bmkp-gnus-jump-other-window]
874 ;;;;; '(menu-item "Gnus..." bmkp-gnus-jump-other-window :help "Jump to a Gnus bookmark"
875 ;;;;; :enable (bmkp-gnus-alist-only)))
876 (define-key bmkp-jump-menu [bmkp-gnus-jump-other-window]
877 '(menu-item "Gnus..." bmkp-gnus-jump-other-window :help "Jump to a Gnus bookmark"))
878 ;;;;; (define-key bmkp-jump-menu [bmkp-man-jump-other-window]
879 ;;;;; '(menu-item "Man Page..." bmkp-man-jump-other-window :help "Jump to a `man'-page bookmark"
880 ;;;;; :enable (bmkp-man-alist-only)))
881 (define-key bmkp-jump-menu [bmkp-man-jump-other-window]
882 '(menu-item "Man Page..." bmkp-man-jump-other-window :help "Jump to a `man'-page bookmark"))
883 ;;;;; (define-key bmkp-jump-menu [bmkp-info-jump-other-window]
884 ;;;;; '(menu-item "Info Node..." bmkp-info-jump-other-window :help "Jump to an Info bookmark"
885 ;;;;; :enable (bmkp-info-alist-only)))
886 (define-key bmkp-jump-menu [bmkp-info-jump-other-window]
887 '(menu-item "Info Node..." bmkp-info-jump-other-window :help "Jump to an Info bookmark"))
888 ;;;;; (define-key bmkp-jump-menu [bmkp-image-jump-other-window]
889 ;;;;; '(menu-item "Image..." bmkp-image-jump-other-window :help "Jump to an image-file bookmark"
890 ;;;;; :enable (bmkp-image-alist-only)))
891 (define-key bmkp-jump-menu [bmkp-image-jump-other-window]
892 '(menu-item "Image..." bmkp-image-jump-other-window :help "Jump to an image-file bookmark"))
893 ;;;;; (define-key bmkp-jump-menu [bmkp-non-file-jump-other-window]
894 ;;;;; '(menu-item "Buffer (Non-File)..." bmkp-non-file-jump-other-window
895 ;;;;; :help "Jump to a non-file (buffer) bookmark" :enable (bmkp-non-file-alist-only)))
896 (define-key bmkp-jump-menu [bmkp-non-file-jump-other-window]
897 '(menu-item "Buffer (Non-File)..." bmkp-non-file-jump-other-window
898 :help "Jump to a non-file (buffer) bookmark"))
899 ;;;;; (define-key bmkp-jump-menu [bmkp-region-jump-other-window]
900 ;;;;; '(menu-item "Region..." bmkp-region-jump-other-window
901 ;;;;; :help "Jump to a bookmark that defines the active region" :enable (bmkp-region-alist-only)))
902 (define-key bmkp-jump-menu [bmkp-region-jump-other-window]
903 '(menu-item "Region..." bmkp-region-jump-other-window
904 :help "Jump to a bookmark that defines the active region"))
905 ;;;;; (define-key bmkp-jump-menu [bmkp-remote-file-jump-other-window]
906 ;;;;; '(menu-item "Remote File..." bmkp-remote-file-jump-other-window
907 ;;;;; :help "Jump to a remote file or directory bookmark" :enable (bmkp-remote-file-alist-only)))
908 (define-key bmkp-jump-menu [bmkp-remote-file-jump-other-window]
909 '(menu-item "Remote File..." bmkp-remote-file-jump-other-window
910 :help "Jump to a remote file or directory bookmark"))
911 ;;;;; (define-key bmkp-jump-menu [bmkp-local-file-jump-other-window]
912 ;;;;; '(menu-item "Local File..." bmkp-local-file-jump-other-window
913 ;;;;; :help "Jump to a local file or directory bookmark" :enable (bmkp-local-file-alist-only)))
914 (define-key bmkp-jump-menu [bmkp-local-file-jump-other-window]
915 '(menu-item "Local File..." bmkp-local-file-jump-other-window
916 :help "Jump to a local file or directory bookmark"))
917 ;;;;; (define-key bmkp-jump-menu [bmkp-file-this-dir-jump-other-window]
918 ;;;;; '(menu-item "File in This Dir..." bmkp-file-this-dir-jump-other-window
919 ;;;;; :help "Jump to a bookmark for a file or subdirectory in the `default-directory'."
920 ;;;;; :enable (bmkp-file-alist-only)))
921 (define-key bmkp-jump-menu [bmkp-file-this-dir-jump-other-window]
922 '(menu-item "File in This Dir..." bmkp-file-this-dir-jump-other-window
923 :help "Jump to a bookmark for a file or subdirectory in the `default-directory'."))
924 ;;;;; (define-key bmkp-jump-menu [bmkp-file-jump-other-window]
925 ;;;;; '(menu-item "File..." bmkp-file-jump-other-window :help "Jump to a file or directory bookmark"
926 ;;;;; :enable (bmkp-file-alist-only)))
927 (define-key bmkp-jump-menu [bmkp-file-jump-other-window]
928 '(menu-item "File..." bmkp-file-jump-other-window :help "Jump to a file or directory bookmark"))
929 ;;;;; (define-key bmkp-jump-menu [bmkp-dired-this-dir-jump-other-window]
930 ;;;;; '(menu-item "Dired for This Dir..." bmkp-dired-this-dir-jump-other-window
931 ;;;;; :help "Jump to a Dired bookmark for `default-directory', restoring recorded state"
932 ;;;;; :enable (bmkp-dired-alist-only)))
933 (define-key bmkp-jump-menu [bmkp-dired-this-dir-jump-other-window]
934 '(menu-item "Dired for This Dir..." bmkp-dired-this-dir-jump-other-window
935 :help "Jump to a Dired bookmark for `default-directory', restoring recorded state"))
936 ;;;;; (define-key bmkp-jump-menu [bmkp-dired-jump-other-window]
937 ;;;;; '(menu-item "Dired..." bmkp-dired-jump-other-window
938 ;;;;; :help "Jump to a Dired bookmark, restoring the recorded Dired state"
939 ;;;;; :enable (bmkp-dired-alist-only)))
940 (define-key bmkp-jump-menu [bmkp-dired-jump-other-window]
941 '(menu-item "Dired..." bmkp-dired-jump-other-window
942 :help "Jump to a Dired bookmark, restoring the recorded Dired state"))
943 ;;;;; (define-key bmkp-jump-menu [bmkp-variable-list-jump]
944 ;;;;; '(menu-item "Variable List..." bmkp-variable-list-jump :help "Jump to a variable-list bookmark"
945 ;;;;; :enable (bmkp-variable-list-alist-only)))
946 (define-key bmkp-jump-menu [bmkp-variable-list-jump]
947 '(menu-item "Variable List..." bmkp-variable-list-jump :help "Jump to a variable-list bookmark"))
948 ;;;;; (define-key bmkp-jump-menu [bmkp-bookmark-file-jump]
949 ;;;;; '(menu-item "Bookmark File..." bmkp-bookmark-file-jump
950 ;;;;; :help "Jump to (load) a bookmark-file bookmark" :enable (bmkp-bookmark-file-alist-only)))
951 (define-key bmkp-jump-menu [bmkp-bookmark-file-jump]
952 '(menu-item "Bookmark File..." bmkp-bookmark-file-jump
953 :help "Jump to (load) a bookmark-file bookmark"))
954 ;;;;; (define-key bmkp-jump-menu [bmkp-bookmark-list-jump]
955 ;;;;; '(menu-item "Bookmark List..." bmkp-bookmark-list-jump :help "Jump to a bookmark-list bookmark"
956 ;;;;; :enable (bmkp-bookmark-list-alist-only)))
957 (define-key bmkp-jump-menu [bmkp-bookmark-list-jump]
958 '(menu-item "Bookmark List..." bmkp-bookmark-list-jump :help "Jump to a bookmark-list bookmark"))
959 ;;;;; (define-key bmkp-jump-menu [bmkp-desktop-jump]
960 ;;;;; '(menu-item "Desktop..." bmkp-desktop-jump :help "Jump to a desktop bookmark"
961 ;;;;; :enable (bmkp-desktop-alist-only)))
962 (define-key bmkp-jump-menu [bmkp-desktop-jump]
963 '(menu-item "Desktop..." bmkp-desktop-jump :help "Jump to a desktop bookmark"))
964 (define-key bmkp-jump-menu [bmkp-jump-to-type-other-window]
965 '(menu-item "Of Type..." bmkp-jump-to-type-other-window
966 :help "Jump to a bookmark of a type that you specify"))
967
968 ;; `bmkp-jump-tags-menu' of vanilla `Bookmarks' menu: `Jump To' > `With Tags'
969
970 (defvar bmkp-jump-tags-menu (make-sparse-keymap)
971 "`With Tags' submenu for `Jump To' submenu of `Bookmarks' menu.")
972 (define-key bmkp-jump-menu [bmkp-tags] (cons "With Tags" bmkp-jump-tags-menu))
973 (define-key bmkp-jump-tags-menu [bmkp-file-this-dir-all-tags-regexp-jump-other-window]
974 '(menu-item "File in This Dir, All Tags Matching Regexp..."
975 bmkp-file-this-dir-all-tags-regexp-jump-other-window
976 :help "Jump to a file bookmark in this dir where each tag matches a regexp"))
977 (define-key bmkp-jump-tags-menu [bmkp-file-this-dir-some-tags-regexp-jump-other-window]
978 '(menu-item "File in This Dir, Any Tag Matching Regexp..."
979 bmkp-file-this-dir-some-tags-regexp-jump-other-window
980 :help "Jump to a file bookmark in this dir where at least one tag matches a regexp"))
981 (define-key bmkp-jump-tags-menu [bmkp-file-this-dir-all-tags-jump-other-window]
982 '(menu-item "File in This Dir, All Tags in Set..." bmkp-file-this-dir-all-tags-jump-other-window
983 :help "Jump to a file bookmark in this dir that has all of a set of tags that you enter"))
984 (define-key bmkp-jump-tags-menu [bmkp-file-this-dir-some-tags-jump-other-window]
985 '(menu-item "File in This Dir, Any Tag in Set..." bmkp-file-this-dir-some-tags-jump-other-window
986 :help "Jump to a file bookmark in this dir that has some of a set of tags that you enter"))
987
988 (define-key bmkp-jump-tags-menu [jump-sep5] '("--")) ;----------------------------------------------
989 (define-key bmkp-jump-tags-menu [bmkp-file-all-tags-regexp-jump-other-window]
990 '(menu-item "File, All Tags Matching Regexp..." bmkp-file-all-tags-regexp-jump-other-window
991 :help "Jump to a file or dir bookmark where each tag matches a regexp that you enter"))
992 (define-key bmkp-jump-tags-menu [bmkp-file-some-tags-regexp-jump-other-window]
993 '(menu-item "File, Any Tag Matching Regexp..." bmkp-file-some-tags-regexp-jump-other-window
994 :help "Jump to a file or dir bookmark where at least one tag matches a regexp that you enter"))
995 (define-key bmkp-jump-tags-menu [bmkp-file-all-tags-jump-other-window]
996 '(menu-item "File, All Tags in Set..." bmkp-file-all-tags-jump-other-window
997 :help "Jump to a file or dir bookmark that has all of a set of tags that you enter"))
998 (define-key bmkp-jump-tags-menu [bmkp-file-some-tags-jump-other-window]
999 '(menu-item "File, Any Tag in Set..." bmkp-file-some-tags-jump-other-window
1000 :help "Jump to a file or dir bookmark that has some of a set of tags that you enter"))
1001
1002 (define-key bmkp-jump-tags-menu [jump-sep4] '("--")) ;----------------------------------------------
1003 (define-key bmkp-jump-tags-menu [bmkp-autofile-all-tags-regexp-jump-other-window]
1004 '(menu-item "Autofile, All Tags Matching Regexp..."
1005 bmkp-autofile-all-tags-regexp-jump-other-window
1006 :help "Jump to an autofile bookmark where each tag matches a regexp that you enter"))
1007 (define-key bmkp-jump-tags-menu [bmkp-autofile-some-tags-regexp-jump-other-window]
1008 '(menu-item "Autofile, Any Tag Matching Regexp..."
1009 bmkp-autofile-some-tags-regexp-jump-other-window
1010 :help "Jump to an autofile bookmark where at least one tag matches a regexp that you enter"))
1011 (define-key bmkp-jump-tags-menu [bmkp-autofile-all-tags-jump-other-window]
1012 '(menu-item "Autofile, All Tags in Set..."
1013 bmkp-autofile-all-tags-jump-other-window
1014 :help "Jump to an autofile bookmark that has all of a set of tags that you enter"))
1015 (define-key bmkp-jump-tags-menu [bmkp-autofile-some-tags-jump-other-window]
1016 '(menu-item "Autofile, Any Tag in Set..." bmkp-autofile-some-tags-jump-other-window
1017 :help "Jump to an autofile bookmark that has some of a set of tags that you enter"))
1018
1019 (when (fboundp 'bmkp-find-file-all-tags) ; Emacs 21+
1020 (define-key bmkp-jump-tags-menu [jump-sep3] '("--")) ;----------------------------------------------
1021 (define-key bmkp-jump-tags-menu [bmkp-find-file-all-tags-regexp-other-window]
1022 '(menu-item "Find Autofile, All Tags Matching Regexp..."
1023 bmkp-find-file-all-tags-regexp-other-window
1024 :help "Visit a bookmarked file where each tag matches a regexp that you enter"))
1025 (define-key bmkp-jump-tags-menu [bmkp-find-file-some-tags-regexp-other-window]
1026 '(menu-item "Find Autofile, Any Tag Matching Regexp..."
1027 bmkp-find-file-some-tags-regexp-other-window
1028 :help "Visit a bookmarked file where at least one tag matches a regexp that you enter"))
1029 (define-key bmkp-jump-tags-menu [bmkp-find-file-all-tags-other-window]
1030 '(menu-item "Find Autofile, All Tags in Set..."
1031 bmkp-find-file-all-tags-other-window
1032 :help "Visit a bookmarked file that has all of a set of tags that you enter"))
1033 (define-key bmkp-jump-tags-menu [bmkp-find-file-some-tags-other-window]
1034 '(menu-item "Find Autofile, Any Tag in Set..." bmkp-find-file-some-tags-other-window
1035 :help "Visit a bookmarked file that has some of a set of tags that you enter")))
1036
1037 (define-key bmkp-jump-tags-menu [jump-sep2] '("--")) ;----------------------------------------------
1038 (define-key bmkp-jump-tags-menu [bmkp-all-tags-regexp-jump-other-window]
1039 '(menu-item "All Tags Matching Regexp..." bmkp-all-tags-regexp-jump-other-window
1040 :help "Jump to a bookmark that has each tag matching a regexp that you enter"))
1041 (define-key bmkp-jump-tags-menu [bmkp-some-tags-regexp-jump-other-window]
1042 '(menu-item "Any Tag Matching Regexp..." bmkp-some-tags-regexp-jump-other-window
1043 :help "Jump to a bookmark that has at least one tag matching a regexp that you enter"))
1044 (define-key bmkp-jump-tags-menu [bmkp-all-tags-jump-other-window]
1045 '(menu-item "All Tags in Set..." bmkp-all-tags-jump-other-window
1046 :help "Jump to a bookmark that has all of a set of tags that you enter"))
1047 (define-key bmkp-jump-tags-menu [bmkp-some-tags-jump-other-window]
1048 '(menu-item "Any Tag in Set..." bmkp-some-tags-jump-other-window
1049 :help "Jump to a bookmark that has some of a set of tags that you enter"))
1050
1051 (define-key bmkp-jump-menu [bookmark-jump-other-window]
1052 '(menu-item "Any in Other Window..." bookmark-jump-other-window
1053 :help "Jump to a bookmark of any type, in another window"))
1054 (define-key bmkp-jump-menu [bookmark-jump]
1055 '(menu-item "Any..." bookmark-jump :help "Jump to a bookmark of any type, in this window"))
1056
1057 ;; `File' > `Find File or Autofile' submenu
1058 ;; or, for Emacs 20-21, single item `File' > `Find File or Autofile...'.
1059 (if (not (fboundp 'bmkp-find-file-all-tags))
1060 (define-key menu-bar-file-menu [bmkp-find-file-other-window] ; Emacs 20-21
1061 '(menu-item "Find File or Autofile..." bmkp-find-file-other-window))
1062 (defvar bmkp-find-file-menu (make-sparse-keymap)
1063 "`Bookmarked File' submenu for menu-bar `File' menu.")
1064 (define-key menu-bar-file-menu [bmkp-find-file-menu]
1065 (list 'menu-item "Find File or Autofile" bmkp-find-file-menu))
1066 (define-key bmkp-find-file-menu [bmkp-find-file-all-tags-regexp-other-window]
1067 '(menu-item "All Tags Matching Regexp..." bmkp-find-file-all-tags-regexp-other-window
1068 :help "Visit a file or dir where each tag matches a regexp that you enter"))
1069 (define-key bmkp-find-file-menu [bmkp-find-file-some-tags-regexp-other-window]
1070 '(menu-item "Any Tag Matching Regexp..." bmkp-find-file-some-tags-regexp-other-window
1071 :help "Jump to a file or dir bookmark where at least one tag matches a regexp that you enter"))
1072 (define-key bmkp-find-file-menu [bmkp-find-file-all-tags-other-window]
1073 '(menu-item "All Tags in Set..." bmkp-find-file-all-tags-other-window
1074 :help "Visit a file or dir that has all of a set of tags that you enter"))
1075 (define-key bmkp-find-file-menu [bmkp-find-file-some-tags-other-window]
1076 '(menu-item "Any Tag in Set..." bmkp-find-file-some-tags-other-window
1077 :help "Visit a file or dir that has some of a set of tags that you enter"))
1078 (define-key bmkp-find-file-menu [find-file-sep2] '("--")) ;---------
1079 (define-key bmkp-find-file-menu [bmkp-find-file-other-window]
1080 '(menu-item "Any File or Autofile..." bmkp-find-file-other-window
1081 :help "Visit a bookmarked file or directory: an autofile bookmark.")))
1082
1083 ;;;;;;;;;;;;;;;;;;;;;
1084
1085 (provide 'bookmark+-key)
1086
1087 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
1088 ;;; bookmark+-key.el ends here