-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathbreadcrumb-test.el
106 lines (94 loc) · 3.21 KB
/
breadcrumb-test.el
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
;;; breadcrumb.el --- Breadcrumb. Set breadcrumb bookmarks and jump to them.
;;
;; Copyright (C) 2004-2008 William W. Wong
;;
;; Author: William W. Wong <williamw520(AT)yahoo(DOT)com>
;; Created: October, 2004
;; Version: 1.1.4
;; Keywords: breadcrumb, quick, bookmark, bookmarks
;; This file is not part of GNU Emacs.
;;; License
;;
;; This program is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License version 2 as
;; published by the Free Software Foundation.
;;
;; This program is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.
;;
;; You should have received a copy of the GNU General Public License
;; along with GNU Emacs; see the file COPYING. If not, write to
;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
;;
;;; Commentary:
;;
;; Some testing and debugging code for breadcrumb.el. Just do this:
;;
;; (load "breadcrumb-test.el")
;;
(require 'breadcrumb)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Testing and debugging
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; Testing
(eval-when-compile
(bc-bookmarks-get 0)
(bc-bookmarks-get 1)
)
;;; Debugging with C-xC-e
(if nil
(progn
(global-set-key "\C-x\M-t" 'bc-dbgtest)
(bc-next)
(bc-previous)
(bc-clear)
(bc-list)
*bc-bookmark-just-added*
*bc-bookmarks*
*bc-current*
type
filename
position
data-list
(setq *bc-current* 0)
(1- (length *bc-bookmarks*))
(buffer-file-name)
(bc-get-buffer-filename bc--type-file)
(bc-get-buffer-position bc--type-file)
(bc-bookmarks-load-file bc-bookmark-file)
(bc-bookmarks-save-file *bc-bookmarks* bc-bookmark-file)
(bc-bookmarks-save)
(bc-bookmarks-restore)
(global-set-key [?\S-\040] 'bc-set)
(global-set-key "\M-j" 'bc-previous)
(global-set-key "\S-\M-j" 'bc-next)
(global-set-key [M-up] 'bc-local-previous)
(global-set-key [M-down] 'bc-local-next)
(global-set-key "\C-cj" 'bc-goto-current)
(global-set-key "\C-x\M-j" 'bc-list)
(global-set-key [C-f2] 'bc-set)
(global-set-key [f2] 'bc-previous)
(global-set-key [S-f2] 'bc-next)
(global-set-key [M-f2] 'bc-list)
(global-set-key [(shift space)] 'bc-set)
(global-set-key [(meta j)] 'bc-previous)
(global-set-key [(shift meta j)] 'bc-next)
(global-set-key [(meta up)] 'bc-local-previous)
(global-set-key [(meta down)] 'bc-local-next)
(global-set-key [(control c)(j)] 'bc-goto-current)
(global-set-key [(control x)(meta j)] 'bc-list)
(global-set-key [(control F2)] 'bc-set)
(global-set-key [(f2)] 'bc-previous)
(global-set-key [(shift f2)] 'bc-next)
(global-set-key [(meta f2)] 'bc-list)
)
(defun bc-dbgtest ()
(interactive)
;(message (buffer-file-name))
;(message (buffer-name))
(message (symbol-name major-mode))
)
)
;;