Mercurial > emacs
annotate lisp/emulation/viper-keym.el @ 94872:c5a53051fe83
(diff-hunk-header-re): Refine the regexp.
author | Stefan Monnier <monnier@iro.umontreal.ca> |
---|---|
date | Sun, 11 May 2008 21:57:27 +0000 |
parents | eb7b2376cae5 |
children | eb7532b56b78 |
rev | line source |
---|---|
14233
396316e5fbe6
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14169
diff
changeset
|
1 ;;; viper-keym.el --- Viper keymaps |
13337 | 2 |
64701
34bd8e434dd7
Update years in copyright notice; nfc.
Thien-Thi Nguyen <ttn@gnuvola.org>
parents:
64215
diff
changeset
|
3 ;; Copyright (C) 1994, 1995, 1996, 1997, 2000, 2001, 2002, 2003, 2004, |
79705 | 4 ;; 2005, 2006, 2007, 2008 Free Software Foundation, Inc. |
11288 | 5 |
42602
633233bf2bbf
2002-01-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
39215
diff
changeset
|
6 ;; Author: Michael Kifer <kifer@cs.stonybrook.edu> |
39215
8dccf2552307
2001-09-09 Michael Kifer <kifer@cs.sunysb.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
38514
diff
changeset
|
7 |
10789 | 8 ;; This file is part of GNU Emacs. |
9 | |
94658
eb7b2376cae5
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
93975
diff
changeset
|
10 ;; GNU Emacs is free software: you can redistribute it and/or modify |
10789 | 11 ;; it under the terms of the GNU General Public License as published by |
94658
eb7b2376cae5
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
93975
diff
changeset
|
12 ;; the Free Software Foundation, either version 3 of the License, or |
eb7b2376cae5
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
93975
diff
changeset
|
13 ;; (at your option) any later version. |
10789 | 14 |
15 ;; GNU Emacs is distributed in the hope that it will be useful, | |
16 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of | |
17 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
18 ;; GNU General Public License for more details. | |
19 | |
20 ;; You should have received a copy of the GNU General Public License | |
94658
eb7b2376cae5
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
93975
diff
changeset
|
21 ;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. |
10789 | 22 |
38414
67b464da13ec
Some fixes to follow coding conventions.
Pavel Janík <Pavel@Janik.cz>
parents:
26263
diff
changeset
|
23 ;;; Commentary: |
67b464da13ec
Some fixes to follow coding conventions.
Pavel Janík <Pavel@Janik.cz>
parents:
26263
diff
changeset
|
24 |
67b464da13ec
Some fixes to follow coding conventions.
Pavel Janík <Pavel@Janik.cz>
parents:
26263
diff
changeset
|
25 ;;; Code: |
14909
7ff1df13b124
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14581
diff
changeset
|
26 |
18047 | 27 ;; compiler pacifier |
18289 | 28 (defvar viper-always) |
19079 | 29 (defvar viper-current-state) |
30 (defvar viper-mode-string) | |
18839 | 31 (defvar viper-expert-level) |
19462 | 32 (defvar viper-ex-style-editing) |
19079 | 33 (defvar viper-ex-style-motion) |
87691
f2c8fd594360
2008-01-10 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
87678
diff
changeset
|
34 |
f2c8fd594360
2008-01-10 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
87678
diff
changeset
|
35 (eval-and-compile |
f2c8fd594360
2008-01-10 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
87678
diff
changeset
|
36 (unless (fboundp 'declare-function) (defmacro declare-function (&rest r)))) |
18047 | 37 ;; end pacifier |
38 | |
10789 | 39 (require 'viper-util) |
40 | |
87691
f2c8fd594360
2008-01-10 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
87678
diff
changeset
|
41 (declare-function viper-ex "viper-ex" (arg &optional string)) |
f2c8fd594360
2008-01-10 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
87678
diff
changeset
|
42 (declare-function viper-normalize-minor-mode-map-alist "viper-cmd" ()) |
f2c8fd594360
2008-01-10 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
87678
diff
changeset
|
43 (declare-function viper-set-mode-vars-for "viper-cmd" (state)) |
18047 | 44 |
10789 | 45 ;;; Variables |
46 | |
49598
0d8b17d428b5
Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
42602
diff
changeset
|
47 |
0d8b17d428b5
Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
42602
diff
changeset
|
48 ;;; Emacs keys in other states. |
18047 | 49 |
19079 | 50 (defcustom viper-want-emacs-keys-in-insert t |
18047 | 51 "*Set to nil if you want complete Vi compatibility in insert mode. |
18839 | 52 Complete compatibility with Vi is not recommended for power use of Viper." |
53 :type 'boolean | |
54 :group 'viper) | |
18047 | 55 |
19079 | 56 (defcustom viper-want-emacs-keys-in-vi t |
18047 | 57 "*Set to nil if you want complete Vi compatibility in Vi mode. |
18839 | 58 Full Vi compatibility is not recommended for power use of Viper." |
59 :type 'boolean | |
60 :group 'viper) | |
18047 | 61 |
19079 | 62 (defcustom viper-no-multiple-ESC t |
18047 | 63 "*If true, multiple ESC in Vi mode will cause bell to ring. |
64 This is set to t on a windowing terminal and to 'twice on a dumb | |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
21940
diff
changeset
|
65 terminal (unless the user level is 1, 2, or 5). On a dumb terminal, this |
18047 | 66 enables cursor keys and is generally more convenient, as terminals usually |
67 don't have a convenient Meta key. | |
19079 | 68 Setting viper-no-multiple-ESC to nil will allow as many multiple ESC, |
18839 | 69 as is allowed by the major mode in effect." |
70 :type 'boolean | |
49598
0d8b17d428b5
Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
42602
diff
changeset
|
71 :group 'viper) |
18047 | 72 |
19079 | 73 (defcustom viper-want-ctl-h-help nil |
19891 | 74 "*If non-nil, C-h gets bound to help-command; otherwise, C-h gets the usual Vi bindings." |
18839 | 75 :type 'boolean |
76 :group 'viper) | |
16136
de1340e6ddb4
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14909
diff
changeset
|
77 |
de1340e6ddb4
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14909
diff
changeset
|
78 |
10789 | 79 ;;; Keymaps |
80 | |
81 ;; Keymaps for vital things like \e and C-z. | |
82 ;; Not for users | |
19079 | 83 (defvar viper-vi-intercept-map (make-sparse-keymap)) |
84 (defvar viper-insert-intercept-map (make-sparse-keymap)) | |
85 (defvar viper-emacs-intercept-map (make-sparse-keymap)) | |
12696
dbbeba770da4
(vip-overriding-map): new variable.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12140
diff
changeset
|
86 |
14233
396316e5fbe6
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14169
diff
changeset
|
87 ;; keymap used to zap all keymaps other than function-key-map, |
396316e5fbe6
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14169
diff
changeset
|
88 ;; device-function-key-map, etc. |
19079 | 89 (defvar viper-overriding-map (make-sparse-keymap)) |
49598
0d8b17d428b5
Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
42602
diff
changeset
|
90 |
19079 | 91 (viper-deflocalvar viper-vi-local-user-map (make-sparse-keymap) |
10789 | 92 "Keymap for user-defined local bindings. |
93 Useful for changing bindings such as ZZ in certain major modes. | |
94 For instance, in letter-mode, one may want to bind ZZ to | |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
21940
diff
changeset
|
95 mh-send-letter. In a newsreader such as gnus, tin, or rn, ZZ could be bound |
10789 | 96 to save-buffers-kill-emacs then post article, etc.") |
49598
0d8b17d428b5
Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
42602
diff
changeset
|
97 (put 'viper-vi-local-user-map 'permanent-local t) |
10789 | 98 |
19079 | 99 (defvar viper-vi-global-user-map (make-sparse-keymap) |
10789 | 100 "Keymap for user-defined global bindings. |
101 These bindings are seen in all Viper buffers.") | |
102 | |
19079 | 103 (defvar viper-vi-basic-map (make-keymap) |
10789 | 104 "This is the main keymap in effect in Viper's Vi state. |
105 This map is global, shared by all buffers.") | |
106 | |
19079 | 107 (defvar viper-vi-kbd-map (make-sparse-keymap) |
10789 | 108 "This keymap keeps keyboard macros defined via the :map command.") |
109 | |
19079 | 110 (defvar viper-vi-diehard-map (make-sparse-keymap) |
10789 | 111 "This keymap is in use when the user asks Viper to simulate Vi very closely. |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
21940
diff
changeset
|
112 This happens when viper-expert-level is 1 or 2. See viper-set-expert-level.") |
49598
0d8b17d428b5
Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
42602
diff
changeset
|
113 |
10789 | 114 |
19079 | 115 (viper-deflocalvar viper-insert-local-user-map (make-sparse-keymap) |
10789 | 116 "Auxiliary map for per-buffer user-defined keybindings in Insert state.") |
49598
0d8b17d428b5
Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
42602
diff
changeset
|
117 (put 'viper-insert-local-user-map 'permanent-local t) |
10789 | 118 |
19079 | 119 (defvar viper-insert-global-user-map (make-sparse-keymap) |
10789 | 120 "Auxiliary map for global user-defined bindings in Insert state.") |
121 | |
19079 | 122 (defvar viper-insert-basic-map (make-sparse-keymap) |
10789 | 123 "The basic insert-mode keymap.") |
124 | |
19079 | 125 (defvar viper-insert-diehard-map (make-keymap) |
10789 | 126 "Map used when user wants vi-style keys in insert mode. |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
21940
diff
changeset
|
127 Most of the Emacs keys are suppressed. This map overshadows |
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
21940
diff
changeset
|
128 viper-insert-basic-map. Not recommended, except for novice users.") |
10789 | 129 |
19079 | 130 (defvar viper-insert-kbd-map (make-sparse-keymap) |
10789 | 131 "This keymap keeps VI-style kbd macros for insert mode.") |
132 | |
19079 | 133 (defvar viper-replace-map (make-sparse-keymap) |
10789 | 134 "Map used in Viper's replace state.") |
49598
0d8b17d428b5
Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
42602
diff
changeset
|
135 |
19079 | 136 (defvar viper-emacs-global-user-map (make-sparse-keymap) |
10789 | 137 "Auxiliary map for global user-defined bindings in Emacs state.") |
138 | |
19079 | 139 (defvar viper-emacs-kbd-map (make-sparse-keymap) |
73740
e4023799fd63
(viper-emacs-kbd-map, viper-toggle-key): Fix typos in docstrings.
Juanma Barranquero <lekktu@gmail.com>
parents:
68648
diff
changeset
|
140 "This keymap keeps Vi-style kbd macros for Emacs mode.") |
49598
0d8b17d428b5
Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
42602
diff
changeset
|
141 |
19079 | 142 (viper-deflocalvar viper-emacs-local-user-map (make-sparse-keymap) |
10789 | 143 "Auxiliary map for local user-defined bindings in Emacs state.") |
49598
0d8b17d428b5
Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
42602
diff
changeset
|
144 (put 'viper-emacs-local-user-map 'permanent-local t) |
10789 | 145 |
146 ;; This keymap should stay empty | |
19079 | 147 (defvar viper-empty-keymap (make-sparse-keymap)) |
10789 | 148 |
12140
75379a19c5d5
Changed vip-*-frame-* to *-frame-*, incorporated overlay strings,
Karl Heuer <kwzh@gnu.org>
parents:
11288
diff
changeset
|
149 ;; This was the main Vi mode in old versions of VIP which may have been |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
21940
diff
changeset
|
150 ;; extensively used by VIP users. We declare it as a global var |
19079 | 151 ;; and, after .viper is loaded, we add this keymap to viper-vi-basic-map. |
152 (defvar viper-mode-map (make-sparse-keymap)) | |
12140
75379a19c5d5
Changed vip-*-frame-* to *-frame-*, incorporated overlay strings,
Karl Heuer <kwzh@gnu.org>
parents:
11288
diff
changeset
|
153 |
64215
a4c59075cac8
* viper-cmd.el (viper--key-maps): new variable.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
64085
diff
changeset
|
154 ;; Some important keys used in viper |
a4c59075cac8
* viper-cmd.el (viper--key-maps): new variable.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
64085
diff
changeset
|
155 (defcustom viper-toggle-key [(control ?z)] ; "\C-z" |
73740
e4023799fd63
(viper-emacs-kbd-map, viper-toggle-key): Fix typos in docstrings.
Juanma Barranquero <lekktu@gmail.com>
parents:
68648
diff
changeset
|
156 "The key used to change states from Emacs to Vi and back. |
64215
a4c59075cac8
* viper-cmd.el (viper--key-maps): new variable.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
64085
diff
changeset
|
157 In insert mode, this key also functions as Meta. |
a4c59075cac8
* viper-cmd.el (viper--key-maps): new variable.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
64085
diff
changeset
|
158 |
73740
e4023799fd63
(viper-emacs-kbd-map, viper-toggle-key): Fix typos in docstrings.
Juanma Barranquero <lekktu@gmail.com>
parents:
68648
diff
changeset
|
159 Enter as a sexp. Examples: \"\\C-z\", [(control ?z)]." |
64215
a4c59075cac8
* viper-cmd.el (viper--key-maps): new variable.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
64085
diff
changeset
|
160 :type 'sexp |
a4c59075cac8
* viper-cmd.el (viper--key-maps): new variable.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
64085
diff
changeset
|
161 :group 'viper |
a4c59075cac8
* viper-cmd.el (viper--key-maps): new variable.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
64085
diff
changeset
|
162 :set (lambda (symbol value) |
a4c59075cac8
* viper-cmd.el (viper--key-maps): new variable.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
64085
diff
changeset
|
163 (let ((old-value (if (boundp 'viper-toggle-key) |
a4c59075cac8
* viper-cmd.el (viper--key-maps): new variable.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
64085
diff
changeset
|
164 viper-toggle-key |
a4c59075cac8
* viper-cmd.el (viper--key-maps): new variable.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
64085
diff
changeset
|
165 [(control ?z)]))) |
84906
afc4adbe0af6
(viper-toggle-key, viper-ESC-key): Use `mapc' rather than `mapcar'.
Juanma Barranquero <lekktu@gmail.com>
parents:
82140
diff
changeset
|
166 (mapc |
64215
a4c59075cac8
* viper-cmd.el (viper--key-maps): new variable.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
64085
diff
changeset
|
167 (lambda (buf) |
a4c59075cac8
* viper-cmd.el (viper--key-maps): new variable.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
64085
diff
changeset
|
168 (save-excursion |
a4c59075cac8
* viper-cmd.el (viper--key-maps): new variable.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
64085
diff
changeset
|
169 (set-buffer buf) |
a4c59075cac8
* viper-cmd.el (viper--key-maps): new variable.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
64085
diff
changeset
|
170 (when (and (boundp 'viper-insert-basic-map) |
a4c59075cac8
* viper-cmd.el (viper--key-maps): new variable.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
64085
diff
changeset
|
171 (keymapp viper-insert-basic-map)) |
a4c59075cac8
* viper-cmd.el (viper--key-maps): new variable.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
64085
diff
changeset
|
172 (when old-value |
a4c59075cac8
* viper-cmd.el (viper--key-maps): new variable.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
64085
diff
changeset
|
173 (define-key viper-insert-basic-map old-value nil)) |
a4c59075cac8
* viper-cmd.el (viper--key-maps): new variable.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
64085
diff
changeset
|
174 (define-key viper-insert-basic-map value 'viper-escape-to-vi)) |
a4c59075cac8
* viper-cmd.el (viper--key-maps): new variable.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
64085
diff
changeset
|
175 (when (and (boundp 'viper-vi-intercept-map) |
a4c59075cac8
* viper-cmd.el (viper--key-maps): new variable.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
64085
diff
changeset
|
176 (keymapp viper-vi-intercept-map)) |
a4c59075cac8
* viper-cmd.el (viper--key-maps): new variable.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
64085
diff
changeset
|
177 (when old-value |
a4c59075cac8
* viper-cmd.el (viper--key-maps): new variable.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
64085
diff
changeset
|
178 (define-key viper-vi-intercept-map old-value nil)) |
a4c59075cac8
* viper-cmd.el (viper--key-maps): new variable.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
64085
diff
changeset
|
179 (define-key |
a4c59075cac8
* viper-cmd.el (viper--key-maps): new variable.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
64085
diff
changeset
|
180 viper-vi-intercept-map value 'viper-toggle-key-action)) |
a4c59075cac8
* viper-cmd.el (viper--key-maps): new variable.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
64085
diff
changeset
|
181 (when (and (boundp 'viper-emacs-intercept-map) |
a4c59075cac8
* viper-cmd.el (viper--key-maps): new variable.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
64085
diff
changeset
|
182 (keymapp viper-emacs-intercept-map)) |
a4c59075cac8
* viper-cmd.el (viper--key-maps): new variable.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
64085
diff
changeset
|
183 (define-key viper-emacs-intercept-map old-value nil) |
a4c59075cac8
* viper-cmd.el (viper--key-maps): new variable.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
64085
diff
changeset
|
184 (define-key |
a4c59075cac8
* viper-cmd.el (viper--key-maps): new variable.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
64085
diff
changeset
|
185 viper-emacs-intercept-map value 'viper-change-state-to-vi)) |
a4c59075cac8
* viper-cmd.el (viper--key-maps): new variable.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
64085
diff
changeset
|
186 )) |
a4c59075cac8
* viper-cmd.el (viper--key-maps): new variable.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
64085
diff
changeset
|
187 (buffer-list)) |
a4c59075cac8
* viper-cmd.el (viper--key-maps): new variable.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
64085
diff
changeset
|
188 (set-default symbol value) |
a4c59075cac8
* viper-cmd.el (viper--key-maps): new variable.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
64085
diff
changeset
|
189 ))) |
a4c59075cac8
* viper-cmd.el (viper--key-maps): new variable.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
64085
diff
changeset
|
190 |
a4c59075cac8
* viper-cmd.el (viper--key-maps): new variable.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
64085
diff
changeset
|
191 (defcustom viper-quoted-insert-key "\C-v" |
a4c59075cac8
* viper-cmd.el (viper--key-maps): new variable.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
64085
diff
changeset
|
192 "The key used to quote special characters when inserting them in Insert state." |
a4c59075cac8
* viper-cmd.el (viper--key-maps): new variable.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
64085
diff
changeset
|
193 :type 'string |
a4c59075cac8
* viper-cmd.el (viper--key-maps): new variable.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
64085
diff
changeset
|
194 :group 'viper) |
a4c59075cac8
* viper-cmd.el (viper--key-maps): new variable.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
64085
diff
changeset
|
195 |
67116
e1bb7e4a4413
2005-11-25 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
64701
diff
changeset
|
196 (defcustom viper-ESC-key (if (viper-window-display-p) [(escape)] "\e") |
64215
a4c59075cac8
* viper-cmd.el (viper--key-maps): new variable.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
64085
diff
changeset
|
197 "Key used to ESC. |
67116
e1bb7e4a4413
2005-11-25 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
64701
diff
changeset
|
198 Enter as a sexp. Examples: \"\\e\", [(escape)]. |
e1bb7e4a4413
2005-11-25 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
64701
diff
changeset
|
199 If running in a terminal, [(escape)] is not understood, so must use \"\\e\"." |
64215
a4c59075cac8
* viper-cmd.el (viper--key-maps): new variable.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
64085
diff
changeset
|
200 :type 'sexp |
a4c59075cac8
* viper-cmd.el (viper--key-maps): new variable.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
64085
diff
changeset
|
201 :group 'viper |
a4c59075cac8
* viper-cmd.el (viper--key-maps): new variable.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
64085
diff
changeset
|
202 :set (lambda (symbol value) |
a4c59075cac8
* viper-cmd.el (viper--key-maps): new variable.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
64085
diff
changeset
|
203 (let ((old-value (if (boundp 'viper-ESC-key) |
a4c59075cac8
* viper-cmd.el (viper--key-maps): new variable.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
64085
diff
changeset
|
204 viper-ESC-key |
a4c59075cac8
* viper-cmd.el (viper--key-maps): new variable.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
64085
diff
changeset
|
205 [(escape)]))) |
84906
afc4adbe0af6
(viper-toggle-key, viper-ESC-key): Use `mapc' rather than `mapcar'.
Juanma Barranquero <lekktu@gmail.com>
parents:
82140
diff
changeset
|
206 (mapc |
64215
a4c59075cac8
* viper-cmd.el (viper--key-maps): new variable.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
64085
diff
changeset
|
207 (lambda (buf) |
a4c59075cac8
* viper-cmd.el (viper--key-maps): new variable.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
64085
diff
changeset
|
208 (save-excursion |
a4c59075cac8
* viper-cmd.el (viper--key-maps): new variable.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
64085
diff
changeset
|
209 (set-buffer buf) |
a4c59075cac8
* viper-cmd.el (viper--key-maps): new variable.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
64085
diff
changeset
|
210 (when (and (boundp 'viper-insert-intercept-map) |
a4c59075cac8
* viper-cmd.el (viper--key-maps): new variable.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
64085
diff
changeset
|
211 (keymapp viper-insert-intercept-map)) |
a4c59075cac8
* viper-cmd.el (viper--key-maps): new variable.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
64085
diff
changeset
|
212 (when old-value |
a4c59075cac8
* viper-cmd.el (viper--key-maps): new variable.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
64085
diff
changeset
|
213 (define-key viper-insert-intercept-map old-value nil)) |
a4c59075cac8
* viper-cmd.el (viper--key-maps): new variable.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
64085
diff
changeset
|
214 (define-key |
a4c59075cac8
* viper-cmd.el (viper--key-maps): new variable.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
64085
diff
changeset
|
215 viper-insert-intercept-map value 'viper-intercept-ESC-key)) |
a4c59075cac8
* viper-cmd.el (viper--key-maps): new variable.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
64085
diff
changeset
|
216 (when (and (boundp 'viper-vi-intercept-map) |
a4c59075cac8
* viper-cmd.el (viper--key-maps): new variable.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
64085
diff
changeset
|
217 (keymapp viper-vi-intercept-map)) |
a4c59075cac8
* viper-cmd.el (viper--key-maps): new variable.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
64085
diff
changeset
|
218 (when old-value |
a4c59075cac8
* viper-cmd.el (viper--key-maps): new variable.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
64085
diff
changeset
|
219 (define-key viper-vi-intercept-map old-value nil)) |
a4c59075cac8
* viper-cmd.el (viper--key-maps): new variable.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
64085
diff
changeset
|
220 (define-key |
a4c59075cac8
* viper-cmd.el (viper--key-maps): new variable.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
64085
diff
changeset
|
221 viper-vi-intercept-map value 'viper-intercept-ESC-key)) |
a4c59075cac8
* viper-cmd.el (viper--key-maps): new variable.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
64085
diff
changeset
|
222 )) |
a4c59075cac8
* viper-cmd.el (viper--key-maps): new variable.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
64085
diff
changeset
|
223 (buffer-list)) |
a4c59075cac8
* viper-cmd.el (viper--key-maps): new variable.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
64085
diff
changeset
|
224 (set-default symbol value) |
a4c59075cac8
* viper-cmd.el (viper--key-maps): new variable.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
64085
diff
changeset
|
225 ))) |
a4c59075cac8
* viper-cmd.el (viper--key-maps): new variable.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
64085
diff
changeset
|
226 |
10789 | 227 |
228 ;;; Variables used by minor modes | |
229 | |
49598
0d8b17d428b5
Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
42602
diff
changeset
|
230 ;; Association list of the form |
10789 | 231 ;; ((major-mode . keymap) (major-mode . keymap) ...) |
232 ;; Viper uses these keymaps to make user-requested adjustments | |
233 ;; to its Vi state in various major modes.") | |
19079 | 234 (defvar viper-vi-state-modifier-alist nil) |
10789 | 235 |
49598
0d8b17d428b5
Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
42602
diff
changeset
|
236 ;; Association list of the form |
10789 | 237 ;; ((major-mode . keymap) (major-mode . keymap) ...) |
238 ;; Viper uses these keymaps to make user-requested adjustments | |
239 ;; to its Insert state in various major modes.") | |
19079 | 240 (defvar viper-insert-state-modifier-alist nil) |
10789 | 241 |
49598
0d8b17d428b5
Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
42602
diff
changeset
|
242 ;; Association list of the form |
10789 | 243 ;; ((major-mode . keymap) (major-mode . keymap) ...) |
244 ;; Viper uses these keymaps to make user-requested adjustments | |
245 ;; to its Emacs state in various major modes. | |
19079 | 246 (defvar viper-emacs-state-modifier-alist nil) |
10789 | 247 |
64215
a4c59075cac8
* viper-cmd.el (viper--key-maps): new variable.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
64085
diff
changeset
|
248 ;; The list of viper keymaps. Set by viper-normalize-minor-mode-map-alist |
a4c59075cac8
* viper-cmd.el (viper--key-maps): new variable.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
64085
diff
changeset
|
249 (viper-deflocalvar viper--key-maps nil) |
a4c59075cac8
* viper-cmd.el (viper--key-maps): new variable.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
64085
diff
changeset
|
250 (viper-deflocalvar viper--intercept-key-maps nil) |
a4c59075cac8
* viper-cmd.el (viper--key-maps): new variable.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
64085
diff
changeset
|
251 |
19079 | 252 ;; Tells viper-add-local-keys to create a new viper-vi-local-user-map for new |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
21940
diff
changeset
|
253 ;; buffers. Not a user option. |
19079 | 254 (viper-deflocalvar viper-need-new-vi-local-map t "") |
255 (put 'viper-need-new-vi-local-map 'permanent-local t) | |
10789 | 256 |
19079 | 257 ;; Tells viper-add-local-keys to create a new viper-insert-local-user-map for |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
21940
diff
changeset
|
258 ;; new buffers. Not a user option. |
19079 | 259 (viper-deflocalvar viper-need-new-insert-local-map t "") |
260 (put 'viper-need-new-insert-local-map 'permanent-local t) | |
10789 | 261 |
19079 | 262 ;; Tells viper-add-local-keys to create a new viper-emacs-local-user-map for |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
21940
diff
changeset
|
263 ;; new buffers. Not a user option. |
19079 | 264 (viper-deflocalvar viper-need-new-emacs-local-map t "") |
265 (put 'viper-need-new-emacs-local-map 'permanent-local t) | |
10789 | 266 |
267 | |
268 | |
269 ;; Insert mode keymap | |
270 | |
271 ;; for novice users, pretend you are the real vi. | |
19079 | 272 (define-key viper-insert-diehard-map "\t" 'viper-insert-tab) |
273 (define-key viper-insert-diehard-map "\C-a" 'self-insert-command) | |
274 (define-key viper-insert-diehard-map "\C-b" 'self-insert-command) | |
275 (define-key viper-insert-diehard-map "\C-c" 'viper-change-state-to-vi) | |
276 (define-key viper-insert-diehard-map "\C-e" 'self-insert-command) | |
277 (define-key viper-insert-diehard-map "\C-f" 'self-insert-command) | |
278 (define-key viper-insert-diehard-map "\C-g" 'self-insert-command) | |
279 (define-key viper-insert-diehard-map "\C-i" 'self-insert-command) | |
280 (define-key viper-insert-diehard-map "\C-k" 'self-insert-command) | |
281 (define-key viper-insert-diehard-map "\C-l" 'self-insert-command) | |
282 (define-key viper-insert-diehard-map "\C-n" 'self-insert-command) | |
283 (define-key viper-insert-diehard-map "\C-o" 'self-insert-command) | |
284 (define-key viper-insert-diehard-map "\C-p" 'self-insert-command) | |
285 (define-key viper-insert-diehard-map "\C-q" 'self-insert-command) | |
286 (define-key viper-insert-diehard-map "\C-r" 'self-insert-command) | |
287 (define-key viper-insert-diehard-map "\C-s" 'self-insert-command) | |
288 (define-key viper-insert-diehard-map "\C-u" 'viper-erase-line) | |
289 (define-key viper-insert-diehard-map "\C-x" 'self-insert-command) | |
290 (define-key viper-insert-diehard-map "\C-y" 'self-insert-command) | |
291 (define-key viper-insert-diehard-map "\C-z" 'self-insert-command) | |
292 (define-key viper-insert-diehard-map "\C-]" 'self-insert-command) | |
293 (define-key viper-insert-diehard-map "\C-_" 'self-insert-command) | |
10789 | 294 |
295 (let ((i ?\ )) | |
296 (while (<= i ?~) | |
19079 | 297 (define-key viper-insert-diehard-map (make-string 1 i) 'self-insert-command) |
10789 | 298 (setq i (1+ i)))) |
299 | |
300 ;; Insert mode map when user wants emacs style | |
19079 | 301 (define-key viper-insert-basic-map "\C-d" 'viper-backward-indent) |
302 (define-key viper-insert-basic-map "\C-w" 'viper-delete-backward-word) | |
303 (define-key viper-insert-basic-map "\C-t" 'viper-forward-indent) | |
62963
fcacef2ed810
2005-06-03 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
62440
diff
changeset
|
304 (define-key viper-insert-basic-map viper-quoted-insert-key 'quoted-insert) |
19079 | 305 (define-key viper-insert-basic-map "\C-?" 'viper-del-backward-char-in-insert) |
19891 | 306 (define-key viper-insert-basic-map [backspace] 'viper-del-backward-char-in-insert) |
19079 | 307 (define-key viper-insert-basic-map "\C-\\" 'viper-alternate-Meta-key) |
308 (define-key viper-insert-basic-map viper-toggle-key 'viper-escape-to-vi) | |
309 (define-key viper-insert-basic-map "\C-c\M-p" | |
310 'viper-insert-prev-from-insertion-ring) | |
311 (define-key viper-insert-basic-map "\C-c\M-n" | |
312 'viper-insert-next-from-insertion-ring) | |
10789 | 313 |
314 | |
315 ;; Replace keymap | |
19079 | 316 (define-key viper-replace-map "\C-t" 'viper-forward-indent) |
317 (define-key viper-replace-map "\C-j" 'viper-replace-state-carriage-return) | |
318 (define-key viper-replace-map "\C-m" 'viper-replace-state-carriage-return) | |
319 (define-key viper-replace-map "\C-?" 'viper-del-backward-char-in-replace) | |
19891 | 320 (define-key viper-replace-map [backspace] 'viper-del-backward-char-in-replace) |
10789 | 321 |
322 | |
323 | |
324 ;; Vi keymaps | |
325 | |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
21940
diff
changeset
|
326 (define-key viper-vi-basic-map "\C-^" (lambda () |
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
21940
diff
changeset
|
327 (interactive) (viper-ex nil "e#"))) |
19079 | 328 (define-key viper-vi-basic-map "\C-b" 'viper-scroll-screen-back) |
329 (define-key viper-vi-basic-map "\C-d" 'viper-scroll-up) | |
330 (define-key viper-vi-basic-map "\C-e" 'viper-scroll-up-one) | |
331 (define-key viper-vi-basic-map "\C-f" 'viper-scroll-screen) | |
332 (define-key viper-vi-basic-map "\C-m" 'viper-next-line-at-bol) | |
333 (define-key viper-vi-basic-map "\C-u" 'viper-scroll-down) | |
334 (define-key viper-vi-basic-map "\C-y" 'viper-scroll-down-one) | |
81331
c3779fe5830e
2007-06-12 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
75389
diff
changeset
|
335 ;;(define-key viper-vi-basic-map "\C-s" 'viper-isearch-forward) |
c3779fe5830e
2007-06-12 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
75389
diff
changeset
|
336 ;;(define-key viper-vi-basic-map "\C-r" 'viper-isearch-backward) |
19079 | 337 (define-key viper-vi-basic-map "\C-c/" 'viper-toggle-search-style) |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
21940
diff
changeset
|
338 (define-key viper-vi-basic-map "\C-c\C-g" 'viper-info-on-file) |
10789 | 339 |
19079 | 340 (define-key viper-vi-basic-map "\C-c\M-p" 'viper-prev-destructive-command) |
341 (define-key viper-vi-basic-map "\C-c\M-n" 'viper-next-destructive-command) | |
10789 | 342 |
343 | |
19079 | 344 (define-key viper-vi-basic-map " " 'viper-forward-char) |
345 (define-key viper-vi-basic-map "!" 'viper-command-argument) | |
346 (define-key viper-vi-basic-map "\"" 'viper-command-argument) | |
347 (define-key viper-vi-basic-map "#" 'viper-command-argument) | |
348 (define-key viper-vi-basic-map "$" 'viper-goto-eol) | |
349 (define-key viper-vi-basic-map "%" 'viper-paren-match) | |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
21940
diff
changeset
|
350 (define-key viper-vi-basic-map "&" (lambda () |
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
21940
diff
changeset
|
351 (interactive) (viper-ex nil "&"))) |
19079 | 352 (define-key viper-vi-basic-map "'" 'viper-goto-mark-and-skip-white) |
353 (define-key viper-vi-basic-map "(" 'viper-backward-sentence) | |
354 (define-key viper-vi-basic-map ")" 'viper-forward-sentence) | |
355 (define-key viper-vi-basic-map "*" 'call-last-kbd-macro) | |
356 (define-key viper-vi-basic-map "+" 'viper-next-line-at-bol) | |
357 (define-key viper-vi-basic-map "," 'viper-repeat-find-opposite) | |
358 (define-key viper-vi-basic-map "-" 'viper-previous-line-at-bol) | |
359 (define-key viper-vi-basic-map "." 'viper-repeat) | |
360 (define-key viper-vi-basic-map "/" 'viper-search-forward) | |
10789 | 361 |
19079 | 362 (define-key viper-vi-basic-map "0" 'viper-beginning-of-line) |
363 (define-key viper-vi-basic-map "1" 'viper-digit-argument) | |
364 (define-key viper-vi-basic-map "2" 'viper-digit-argument) | |
365 (define-key viper-vi-basic-map "3" 'viper-digit-argument) | |
366 (define-key viper-vi-basic-map "4" 'viper-digit-argument) | |
367 (define-key viper-vi-basic-map "5" 'viper-digit-argument) | |
368 (define-key viper-vi-basic-map "6" 'viper-digit-argument) | |
369 (define-key viper-vi-basic-map "7" 'viper-digit-argument) | |
370 (define-key viper-vi-basic-map "8" 'viper-digit-argument) | |
371 (define-key viper-vi-basic-map "9" 'viper-digit-argument) | |
10789 | 372 |
19079 | 373 (define-key viper-vi-basic-map ":" 'viper-ex) |
374 (define-key viper-vi-basic-map ";" 'viper-repeat-find) | |
375 (define-key viper-vi-basic-map "<" 'viper-command-argument) | |
376 (define-key viper-vi-basic-map "=" 'viper-command-argument) | |
377 (define-key viper-vi-basic-map ">" 'viper-command-argument) | |
378 (define-key viper-vi-basic-map "?" 'viper-search-backward) | |
379 (define-key viper-vi-basic-map "@" 'viper-register-macro) | |
10789 | 380 |
19079 | 381 (define-key viper-vi-basic-map "A" 'viper-Append) |
382 (define-key viper-vi-basic-map "B" 'viper-backward-Word) | |
383 (define-key viper-vi-basic-map "C" 'viper-change-to-eol) | |
384 (define-key viper-vi-basic-map "D" 'viper-kill-line) | |
385 (define-key viper-vi-basic-map "E" 'viper-end-of-Word) | |
386 (define-key viper-vi-basic-map "F" 'viper-find-char-backward) | |
387 (define-key viper-vi-basic-map "G" 'viper-goto-line) | |
388 (define-key viper-vi-basic-map "H" 'viper-window-top) | |
389 (define-key viper-vi-basic-map "I" 'viper-Insert) | |
390 (define-key viper-vi-basic-map "J" 'viper-join-lines) | |
391 (define-key viper-vi-basic-map "K" 'viper-nil) | |
392 (define-key viper-vi-basic-map "L" 'viper-window-bottom) | |
393 (define-key viper-vi-basic-map "M" 'viper-window-middle) | |
394 (define-key viper-vi-basic-map "N" 'viper-search-Next) | |
395 (define-key viper-vi-basic-map "O" 'viper-Open-line) | |
396 (define-key viper-vi-basic-map "P" 'viper-Put-back) | |
397 (define-key viper-vi-basic-map "Q" 'viper-query-replace) | |
398 (define-key viper-vi-basic-map "R" 'viper-overwrite) | |
399 (define-key viper-vi-basic-map "S" 'viper-substitute-line) | |
400 (define-key viper-vi-basic-map "T" 'viper-goto-char-backward) | |
401 (define-key viper-vi-basic-map "U" 'viper-undo) | |
402 (define-key viper-vi-basic-map "V" 'find-file-other-window) | |
403 (define-key viper-vi-basic-map "W" 'viper-forward-Word) | |
404 (define-key viper-vi-basic-map "X" 'viper-delete-backward-char) | |
405 (define-key viper-vi-basic-map "Y" 'viper-yank-line) | |
406 (define-key viper-vi-basic-map "ZZ" 'viper-save-kill-buffer) | |
10789 | 407 |
19079 | 408 (define-key viper-vi-basic-map "\\" 'viper-escape-to-emacs) |
409 (define-key viper-vi-basic-map "[" 'viper-brac-function) | |
410 (define-key viper-vi-basic-map "]" 'viper-ket-function) | |
411 (define-key viper-vi-basic-map "\C-\\" 'viper-alternate-Meta-key) | |
412 (define-key viper-vi-basic-map "^" 'viper-bol-and-skip-white) | |
413 (define-key viper-vi-basic-map "`" 'viper-goto-mark) | |
10789 | 414 |
19079 | 415 (define-key viper-vi-basic-map "a" 'viper-append) |
416 (define-key viper-vi-basic-map "b" 'viper-backward-word) | |
417 (define-key viper-vi-basic-map "c" 'viper-command-argument) | |
418 (define-key viper-vi-basic-map "d" 'viper-command-argument) | |
419 (define-key viper-vi-basic-map "e" 'viper-end-of-word) | |
420 (define-key viper-vi-basic-map "f" 'viper-find-char-forward) | |
421 (define-key viper-vi-basic-map "g" 'viper-nil) | |
422 (define-key viper-vi-basic-map "h" 'viper-backward-char) | |
19891 | 423 (define-key viper-vi-basic-map [backspace] 'viper-backward-char) |
19079 | 424 (define-key viper-vi-basic-map "i" 'viper-insert) |
425 (define-key viper-vi-basic-map "j" 'viper-next-line) | |
426 (define-key viper-vi-basic-map "k" 'viper-previous-line) | |
427 (define-key viper-vi-basic-map "l" 'viper-forward-char) | |
428 (define-key viper-vi-basic-map "m" 'viper-mark-point) | |
429 (define-key viper-vi-basic-map "n" 'viper-search-next) | |
430 (define-key viper-vi-basic-map "o" 'viper-open-line) | |
431 (define-key viper-vi-basic-map "p" 'viper-put-back) | |
432 (define-key viper-vi-basic-map "q" 'viper-nil) | |
433 (define-key viper-vi-basic-map "r" 'viper-replace-char) | |
434 (define-key viper-vi-basic-map "s" 'viper-substitute) | |
435 (define-key viper-vi-basic-map "t" 'viper-goto-char-forward) | |
436 (define-key viper-vi-basic-map "u" 'viper-undo) | |
437 (define-key viper-vi-basic-map "v" 'find-file) | |
438 (define-key viper-vi-basic-map "\C-v" 'find-file-other-frame) | |
439 (define-key viper-vi-basic-map "w" 'viper-forward-word) | |
440 (define-key viper-vi-basic-map "x" 'viper-delete-char) | |
441 (define-key viper-vi-basic-map "y" 'viper-command-argument) | |
442 (define-key viper-vi-basic-map "zH" 'viper-line-to-top) | |
443 (define-key viper-vi-basic-map "zM" 'viper-line-to-middle) | |
444 (define-key viper-vi-basic-map "zL" 'viper-line-to-bottom) | |
445 (define-key viper-vi-basic-map "z\C-m" 'viper-line-to-top) | |
446 (define-key viper-vi-basic-map "z." 'viper-line-to-middle) | |
447 (define-key viper-vi-basic-map "z-" 'viper-line-to-bottom) | |
10789 | 448 |
19079 | 449 (define-key viper-vi-basic-map "{" 'viper-backward-paragraph) |
450 (define-key viper-vi-basic-map "|" 'viper-goto-col) | |
451 (define-key viper-vi-basic-map "}" 'viper-forward-paragraph) | |
452 (define-key viper-vi-basic-map "~" 'viper-toggle-case) | |
453 (define-key viper-vi-basic-map "\C-?" 'viper-backward-char) | |
454 (define-key viper-vi-basic-map "_" 'viper-nil) | |
10789 | 455 |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
21940
diff
changeset
|
456 ;;; This is viper-vi-diehard-map. Used when viper-vi-diehard-minor-mode is on. |
10789 | 457 |
19079 | 458 (define-key viper-vi-diehard-map "\C-a" 'viper-nil) |
459 (define-key viper-vi-diehard-map "\C-c" 'viper-nil) | |
460 (define-key viper-vi-diehard-map "\C-g" 'viper-info-on-file) | |
461 (define-key viper-vi-diehard-map "\C-i" 'viper-nil) | |
462 (define-key viper-vi-diehard-map "\C-k" 'viper-nil) | |
463 (define-key viper-vi-diehard-map "\C-l" 'redraw-display) | |
464 (define-key viper-vi-diehard-map "\C-n" 'viper-next-line) | |
465 (define-key viper-vi-diehard-map "\C-o" 'viper-nil) | |
466 (define-key viper-vi-diehard-map "\C-p" 'viper-previous-line) | |
467 (define-key viper-vi-diehard-map "\C-q" 'viper-nil) | |
468 (define-key viper-vi-diehard-map "\C-r" 'redraw-display) | |
469 (define-key viper-vi-diehard-map "\C-s" 'viper-nil) | |
470 (define-key viper-vi-diehard-map "\C-t" 'viper-nil) | |
471 (define-key viper-vi-diehard-map "\C-v" 'viper-nil) | |
472 (define-key viper-vi-diehard-map "\C-w" 'viper-nil) | |
473 (define-key viper-vi-diehard-map "@" 'viper-nil) | |
474 (define-key viper-vi-diehard-map "_" 'viper-nil) | |
475 (define-key viper-vi-diehard-map "*" 'viper-nil) | |
476 (define-key viper-vi-diehard-map "#" 'viper-nil) | |
477 (define-key viper-vi-diehard-map "\C-_" 'viper-nil) | |
478 (define-key viper-vi-diehard-map "\C-]" 'viper-nil) ; This is actually tags. | |
10789 | 479 |
480 | |
481 ;;; Minibuffer keymap | |
49598
0d8b17d428b5
Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
42602
diff
changeset
|
482 |
10789 | 483 |
19079 | 484 (defvar viper-minibuffer-map (make-sparse-keymap) |
10789 | 485 "Keymap used to modify keys when Minibuffer is in Insert state.") |
49598
0d8b17d428b5
Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
42602
diff
changeset
|
486 |
19079 | 487 (define-key viper-minibuffer-map "\C-m" 'viper-exit-minibuffer) |
488 (define-key viper-minibuffer-map "\C-j" 'viper-exit-minibuffer) | |
10789 | 489 |
490 ;; Map used to read Ex-style commands. | |
19079 | 491 (defvar viper-ex-cmd-map (make-sparse-keymap)) |
492 (define-key viper-ex-cmd-map " " 'ex-cmd-read-exit) | |
493 (define-key viper-ex-cmd-map "\t" 'ex-cmd-complete) | |
10789 | 494 |
495 ;; Keymap for reading file names in Ex-style commands. | |
496 (defvar ex-read-filename-map (make-sparse-keymap)) | |
19079 | 497 (define-key ex-read-filename-map " " 'viper-complete-filename-or-exit) |
498 (define-key ex-read-filename-map "!" 'viper-handle-!) | |
10789 | 499 |
16136
de1340e6ddb4
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14909
diff
changeset
|
500 ;; Some other maps |
19079 | 501 (defvar viper-slash-and-colon-map (make-sparse-keymap) |
16136
de1340e6ddb4
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14909
diff
changeset
|
502 "This map redefines `/' and `:' to behave as in Vi. |
de1340e6ddb4
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14909
diff
changeset
|
503 Useful in some modes, such as Gnus, MH, etc.") |
19079 | 504 (define-key viper-slash-and-colon-map ":" 'viper-ex) |
505 (define-key viper-slash-and-colon-map "/" 'viper-search-forward) | |
10789 | 506 |
19079 | 507 (defvar viper-comint-mode-modifier-map (make-sparse-keymap) |
16136
de1340e6ddb4
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14909
diff
changeset
|
508 "This map modifies comint mode.") |
38514
10482dd382e7
* viper-ex.el (ex-token-list,ex-cmd-execute): Revamped, courtesy
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
38414
diff
changeset
|
509 (define-key viper-comint-mode-modifier-map "\C-m" 'viper-exec-key-in-emacs) |
10482dd382e7
* viper-ex.el (ex-token-list,ex-cmd-execute): Revamped, courtesy
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
38414
diff
changeset
|
510 (define-key viper-comint-mode-modifier-map "\C-d" 'viper-exec-key-in-emacs) |
16136
de1340e6ddb4
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14909
diff
changeset
|
511 |
19079 | 512 (defvar viper-dired-modifier-map (make-sparse-keymap) |
16136
de1340e6ddb4
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14909
diff
changeset
|
513 "This map modifies Dired behavior.") |
19079 | 514 (define-key viper-dired-modifier-map ":" 'viper-ex) |
515 (define-key viper-dired-modifier-map "/" 'viper-search-forward) | |
16136
de1340e6ddb4
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14909
diff
changeset
|
516 |
60168
d96e54250eea
* viper-cmd.el (viper-prefix-commands): make into a defconst.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
52401
diff
changeset
|
517 (defvar viper-gnus-modifier-map (make-sparse-keymap) |
d96e54250eea
* viper-cmd.el (viper-prefix-commands): make into a defconst.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
52401
diff
changeset
|
518 "This map modifies Gnus behavior.") |
d96e54250eea
* viper-cmd.el (viper-prefix-commands): make into a defconst.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
52401
diff
changeset
|
519 (define-key viper-gnus-modifier-map ":" 'viper-ex) |
d96e54250eea
* viper-cmd.el (viper-prefix-commands): make into a defconst.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
52401
diff
changeset
|
520 |
16136
de1340e6ddb4
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14909
diff
changeset
|
521 |
10789 | 522 |
523 ;;; Code | |
524 | |
19079 | 525 (defun viper-add-local-keys (state alist) |
10789 | 526 "Override some vi-state or insert-state bindings in the current buffer. |
527 The effect is seen in the current buffer only. | |
528 Useful for customizing mailer buffers, gnus, etc. | |
529 STATE is 'vi-state, 'insert-state, or 'emacs-state | |
530 ALIST is of the form ((key . func) (key . func) ...) | |
531 Normally, this would be called from a hook to a major mode or | |
532 on a per buffer basis. | |
533 Usage: | |
19079 | 534 (viper-add-local-keys state '((key-str . func) (key-str . func)...)) " |
49598
0d8b17d428b5
Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
42602
diff
changeset
|
535 |
10789 | 536 (let (map) |
537 (cond ((eq state 'vi-state) | |
19079 | 538 (if viper-need-new-vi-local-map |
539 (setq viper-vi-local-user-map (make-sparse-keymap))) | |
540 (setq viper-need-new-vi-local-map nil | |
541 map viper-vi-local-user-map)) | |
10789 | 542 ((eq state 'insert-state) |
19079 | 543 (if viper-need-new-insert-local-map |
544 (setq viper-insert-local-user-map (make-sparse-keymap))) | |
545 (setq viper-need-new-insert-local-map nil | |
546 map viper-insert-local-user-map)) | |
10789 | 547 ((eq state 'emacs-state) |
19079 | 548 (if viper-need-new-emacs-local-map |
549 (setq viper-emacs-local-user-map (make-sparse-keymap))) | |
550 (setq viper-need-new-emacs-local-map nil | |
551 map viper-emacs-local-user-map)) | |
49598
0d8b17d428b5
Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
42602
diff
changeset
|
552 (t |
10789 | 553 (error |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
21940
diff
changeset
|
554 "Invalid state in viper-add-local-keys: %S. Valid states: vi-state, insert-state or emacs-state" state))) |
10789 | 555 |
19079 | 556 (viper-modify-keymap map alist) |
557 (viper-normalize-minor-mode-map-alist) | |
558 (viper-set-mode-vars-for viper-current-state))) | |
14233
396316e5fbe6
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14169
diff
changeset
|
559 |
19079 | 560 (defun viper-zap-local-keys () |
561 "Unconditionally reset Viper viper-*-local-user-map's. | |
64215
a4c59075cac8
* viper-cmd.el (viper--key-maps): new variable.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
64085
diff
changeset
|
562 Rarely useful, but if you made a mistake by switching to a mode that adds |
16136
de1340e6ddb4
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14909
diff
changeset
|
563 undesirable local keys, e.g., comint-mode, then this function can restore |
de1340e6ddb4
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14909
diff
changeset
|
564 sanity." |
14233
396316e5fbe6
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14169
diff
changeset
|
565 (interactive) |
19079 | 566 (setq viper-vi-local-user-map (make-sparse-keymap) |
567 viper-need-new-vi-local-map nil | |
568 viper-insert-local-user-map (make-sparse-keymap) | |
569 viper-need-new-insert-local-map nil | |
570 viper-emacs-local-user-map (make-sparse-keymap) | |
571 viper-need-new-emacs-local-map nil) | |
572 (viper-normalize-minor-mode-map-alist)) | |
49598
0d8b17d428b5
Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
42602
diff
changeset
|
573 |
10789 | 574 |
19079 | 575 (defun viper-modify-major-mode (mode state keymap) |
10789 | 576 "Modify key bindings in a major-mode in a Viper state using a keymap. |
577 | |
578 If the default for a major mode is emacs-state, then modifications to this | |
579 major mode may not take effect until the buffer switches state to Vi, | |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
21940
diff
changeset
|
580 Insert or Emacs. If this happens, add viper-change-state-to-emacs to this |
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
21940
diff
changeset
|
581 major mode's hook. If no such hook exists, you may have to put an advice on |
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
21940
diff
changeset
|
582 the function that invokes the major mode. See viper-set-hooks for hints. |
10789 | 583 |
584 The above needs not to be done for major modes that come up in Vi or Insert | |
585 state by default. | |
586 | |
19079 | 587 Arguments: (major-mode viper-state keymap)" |
10789 | 588 (let ((alist |
19079 | 589 (cond ((eq state 'vi-state) 'viper-vi-state-modifier-alist) |
590 ((eq state 'insert-state) 'viper-insert-state-modifier-alist) | |
591 ((eq state 'emacs-state) 'viper-emacs-state-modifier-alist))) | |
10789 | 592 elt) |
593 (if (setq elt (assoc mode (eval alist))) | |
594 (set alist (delq elt (eval alist)))) | |
595 (set alist (cons (cons mode keymap) (eval alist))) | |
49598
0d8b17d428b5
Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
42602
diff
changeset
|
596 |
10789 | 597 ;; Normalization usually doesn't help here, since one needs to |
598 ;; normalize in the actual buffer where changes to the keymap are | |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
21940
diff
changeset
|
599 ;; to take place. However, it doesn't hurt, and it helps whenever this |
21940 | 600 ;; function is actually called from within the affected buffer. |
19079 | 601 (viper-normalize-minor-mode-map-alist) |
49598
0d8b17d428b5
Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
42602
diff
changeset
|
602 |
19079 | 603 (viper-set-mode-vars-for viper-current-state))) |
10789 | 604 |
49598
0d8b17d428b5
Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
42602
diff
changeset
|
605 |
12140
75379a19c5d5
Changed vip-*-frame-* to *-frame-*, incorporated overlay strings,
Karl Heuer <kwzh@gnu.org>
parents:
11288
diff
changeset
|
606 ;; Displays variables that control Viper's keymaps |
19079 | 607 (defun viper-debug-keymaps () |
10789 | 608 (interactive) |
19079 | 609 (with-output-to-temp-buffer " *viper-debug*" |
10789 | 610 (princ (format "Buffer name: %s\n\n" (buffer-name))) |
611 (princ "Variables: \n") | |
612 (princ (format "major-mode: %S\n" major-mode)) | |
19079 | 613 (princ (format "viper-current-state: %S\n" viper-current-state)) |
614 (princ (format "viper-mode-string: %S\n\n" viper-mode-string)) | |
615 (princ (format "viper-vi-intercept-minor-mode: %S\n" | |
616 viper-vi-intercept-minor-mode)) | |
617 (princ (format "viper-insert-intercept-minor-mode: %S\n" | |
618 viper-insert-intercept-minor-mode)) | |
619 (princ (format "viper-emacs-intercept-minor-mode: %S\n" | |
620 viper-emacs-intercept-minor-mode)) | |
621 (princ (format "viper-vi-minibuffer-minor-mode: %S\n" | |
622 viper-vi-minibuffer-minor-mode)) | |
623 (princ (format "viper-insert-minibuffer-minor-mode: %S\n\n" | |
624 viper-insert-minibuffer-minor-mode)) | |
625 (princ (format "viper-vi-local-user-minor-mode: %S\n" | |
626 viper-vi-local-user-minor-mode)) | |
627 (princ (format "viper-vi-global-user-minor-mode: %S\n" | |
628 viper-vi-global-user-minor-mode)) | |
629 (princ (format "viper-vi-kbd-minor-mode: %S\n" viper-vi-kbd-minor-mode)) | |
630 (princ (format "viper-vi-state-modifier-minor-mode: %S\n" | |
631 viper-vi-state-modifier-minor-mode)) | |
632 (princ (format "viper-vi-diehard-minor-mode: %S\n" | |
633 viper-vi-diehard-minor-mode)) | |
634 (princ (format "viper-vi-basic-minor-mode: %S\n" viper-vi-basic-minor-mode)) | |
635 (princ (format "viper-replace-minor-mode: %S\n" viper-replace-minor-mode)) | |
636 (princ (format "viper-insert-local-user-minor-mode: %S\n" | |
637 viper-insert-local-user-minor-mode)) | |
638 (princ (format "viper-insert-global-user-minor-mode: %S\n" | |
639 viper-insert-global-user-minor-mode)) | |
640 (princ (format "viper-insert-kbd-minor-mode: %S\n" | |
49598
0d8b17d428b5
Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
42602
diff
changeset
|
641 viper-insert-kbd-minor-mode)) |
19079 | 642 (princ (format "viper-insert-state-modifier-minor-mode: %S\n" |
643 viper-insert-state-modifier-minor-mode)) | |
644 (princ (format "viper-insert-diehard-minor-mode: %S\n" | |
645 viper-insert-diehard-minor-mode)) | |
646 (princ (format "viper-insert-basic-minor-mode: %S\n" | |
647 viper-insert-basic-minor-mode)) | |
648 (princ (format "viper-emacs-local-user-minor-mode: %S\n" | |
649 viper-emacs-local-user-minor-mode)) | |
650 (princ (format "viper-emacs-kbd-minor-mode: %S\n" | |
651 viper-emacs-kbd-minor-mode)) | |
652 (princ (format "viper-emacs-global-user-minor-mode: %S\n" | |
653 viper-emacs-global-user-minor-mode)) | |
654 (princ (format "viper-emacs-state-modifier-minor-mode: %S\n" | |
655 viper-emacs-state-modifier-minor-mode)) | |
49598
0d8b17d428b5
Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
42602
diff
changeset
|
656 |
18839 | 657 (princ (format "\nviper-expert-level %S\n" viper-expert-level)) |
19079 | 658 (princ (format "viper-no-multiple-ESC %S\n" viper-no-multiple-ESC)) |
18289 | 659 (princ (format "viper-always %S\n" viper-always)) |
19079 | 660 (princ (format "viper-ex-style-motion %S\n" |
661 viper-ex-style-motion)) | |
19462 | 662 (princ (format "viper-ex-style-editing %S\n" |
663 viper-ex-style-editing)) | |
19079 | 664 (princ (format "viper-want-emacs-keys-in-vi %S\n" |
49598
0d8b17d428b5
Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
42602
diff
changeset
|
665 viper-want-emacs-keys-in-vi)) |
19079 | 666 (princ (format "viper-want-emacs-keys-in-insert %S\n" |
49598
0d8b17d428b5
Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
42602
diff
changeset
|
667 viper-want-emacs-keys-in-insert)) |
19079 | 668 (princ (format "viper-want-ctl-h-help %S\n" viper-want-ctl-h-help)) |
49598
0d8b17d428b5
Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
42602
diff
changeset
|
669 |
10789 | 670 (princ "\n\n\n") |
671 (princ (format "Default value for minor-mode-map-alist: \n%S\n\n" | |
672 (default-value 'minor-mode-map-alist))) | |
673 (princ (format "Actual value for minor-mode-map-alist: \n%S\n" | |
674 minor-mode-map-alist)) | |
675 )) | |
49598
0d8b17d428b5
Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
42602
diff
changeset
|
676 |
10789 | 677 |
678 ;;; Keymap utils | |
49598
0d8b17d428b5
Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
42602
diff
changeset
|
679 |
0d8b17d428b5
Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
42602
diff
changeset
|
680 (defun viper-add-keymap (mapsrc mapdst) |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
21940
diff
changeset
|
681 "Add contents of mapsrc to mapdst. It is assumed that mapsrc is sparse." |
92377
20e7f613b637
Expand all viper-cond-compile-for-xemacs-or-emacs calls to a featurep test.
Glenn Morris <rgm@gnu.org>
parents:
87691
diff
changeset
|
682 (if (featurep 'xemacs) |
20e7f613b637
Expand all viper-cond-compile-for-xemacs-or-emacs calls to a featurep test.
Glenn Morris <rgm@gnu.org>
parents:
87691
diff
changeset
|
683 ;; Emacs 22 has map-keymap. |
20e7f613b637
Expand all viper-cond-compile-for-xemacs-or-emacs calls to a featurep test.
Glenn Morris <rgm@gnu.org>
parents:
87691
diff
changeset
|
684 (map-keymap (lambda (key binding) (define-key mapdst key binding)) |
20e7f613b637
Expand all viper-cond-compile-for-xemacs-or-emacs calls to a featurep test.
Glenn Morris <rgm@gnu.org>
parents:
87691
diff
changeset
|
685 mapsrc) |
20e7f613b637
Expand all viper-cond-compile-for-xemacs-or-emacs calls to a featurep test.
Glenn Morris <rgm@gnu.org>
parents:
87691
diff
changeset
|
686 (mapc (lambda (p) (define-key mapdst (vector (car p)) (cdr p))) |
20e7f613b637
Expand all viper-cond-compile-for-xemacs-or-emacs calls to a featurep test.
Glenn Morris <rgm@gnu.org>
parents:
87691
diff
changeset
|
687 (cdr mapsrc)))) |
49598
0d8b17d428b5
Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
42602
diff
changeset
|
688 |
19079 | 689 (defun viper-modify-keymap (map alist) |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
21940
diff
changeset
|
690 "Modifies MAP with bindings specified in the ALIST. The alist has the |
10789 | 691 form ((key . function) (key . function) ... )." |
49598
0d8b17d428b5
Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
42602
diff
changeset
|
692 (mapcar (lambda (p) (define-key map (eval (car p)) (cdr p))) |
10789 | 693 alist)) |
694 | |
695 | |
86980
696a6b8decff
(top-level): Don't load viper-util when compiling. Move provide
Glenn Morris <rgm@gnu.org>
parents:
86520
diff
changeset
|
696 (provide 'viper-keym) |
696a6b8decff
(top-level): Don't load viper-util when compiling. Move provide
Glenn Morris <rgm@gnu.org>
parents:
86520
diff
changeset
|
697 |
696a6b8decff
(top-level): Don't load viper-util when compiling. Move provide
Glenn Morris <rgm@gnu.org>
parents:
86520
diff
changeset
|
698 |
18839 | 699 ;;; Local Variables: |
19079 | 700 ;;; eval: (put 'viper-deflocalvar 'lisp-indent-hook 'defun) |
18839 | 701 ;;; End: |
702 | |
703 | |
93975
1e3a407766b9
Fix up comment convention on the arch-tag lines.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
92377
diff
changeset
|
704 ;; arch-tag: 43af4b2f-0bea-400b-889e-221ebc00acb1 |
38414
67b464da13ec
Some fixes to follow coding conventions.
Pavel Janík <Pavel@Janik.cz>
parents:
26263
diff
changeset
|
705 ;;; viper-keym.el ends here |