source: tags/pre_1_0_pre_hash_modifications/ccl/hemlock/src/bindings.lisp @ 2475

Last change on this file since 2475 was 2475, checked in by anonymous, 14 years ago

This commit was manufactured by cvs2svn to create tag
'pre_1_0_pre_hash_modifications'.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 34.3 KB
Line 
1;;; -*- Log: hemlock.log; Package: Hemlock -*-
2;;;
3;;; **********************************************************************
4;;; This code was written as part of the CMU Common Lisp project at
5;;; Carnegie Mellon University, and has been placed in the public domain.
6;;;
7#+CMU (ext:file-comment
8       "$Header$")
9;;;
10;;; **********************************************************************
11;;;
12;;; Some bindings:
13;;;
14
15(in-package :hemlock)
16
17
18
19;;;; Default key translations:
20
21;;; This page defines prefix characters that set specified modifier bits on
22;;; the next character typed.
23;;;
24(setf (key-translation #k"escape") '(:bits :meta))
25(setf (key-translation #k"control-z") '(:bits :control :meta))
26(setf (key-translation #k"control-Z") '(:bits :control :meta))
27(setf (key-translation #k"control-^") '(:bits :control))
28(setf (key-translation #k"control-c") '(:bits :hyper))
29(setf (key-translation #k"control-C") '(:bits :hyper))
30
31
32
33;;;; Most every binding.
34
35;;; Self insert letters:
36;;;
37(hemlock-ext:do-alpha-key-events (key-event :both)
38                                 (bind-key "Self Insert" key-event))
39
40(bind-key "Beginning of Line" #k"control-a")
41(bind-key "Delete Next Character" #k"control-d")
42(bind-key "End of Line" #k"control-e")
43(bind-key "Forward Character" #k"control-f")
44(bind-key "Forward Character" #k"rightarrow")
45(bind-key "Backward Character" #k"control-b")
46(bind-key "Backward Character" #k"leftarrow")
47(bind-key "Kill Line" #k"control-k")
48(bind-key "Refresh Screen" #k"control-l")
49(bind-key "Next Line" #k"control-n")
50(bind-key "Next Line" #k"downarrow")
51(bind-key "Previous Line" #k"control-p")
52(bind-key "Previous Line" #k"uparrow")
53(bind-key "Query Replace" #k"meta-%")
54(bind-key "Reverse Incremental Search" #k"control-r")
55(bind-key "Incremental Search" #k"control-s")
56(bind-key "Forward Search" #k"meta-s")
57(bind-key "Reverse Search" #k"meta-r")
58(bind-key "Transpose Characters" #k"control-t")
59(bind-key "Universal Argument" #k"control-u")
60(bind-key "Scroll Window Down" #k"control-v")
61(bind-key "Scroll Window Up" #k"meta-v")
62(bind-key "Scroll Next Window Down" #k"control-meta-v")
63(bind-key "Scroll Next Window Up" #k"control-meta-V")
64
65(bind-key "Process File Options" #k"control-x m" :global)
66(bind-key "Ensure File Options Line" #k"control-meta-M" :global)
67(bind-key "Help" #k"home")
68(bind-key "Help" #k"control-_")
69(bind-key "Describe Key" #k"meta-?")
70
71
72(bind-key "Here to Top of Window" #k"leftdown")
73(bind-key "Do Nothing" #k"leftup")
74(bind-key "Top Line to Here" #k"rightdown")
75(bind-key "Do Nothing" #k"rightup")
76(bind-key "Point to Here" #k"middledown")
77(bind-key "Point to Here" #k"super-leftdown")
78(bind-key "Generic Pointer Up" #k"middleup")
79(bind-key "Generic Pointer Up" #k"super-leftup")
80(bind-key "Do Nothing" #k"super-rightup")
81(bind-key "Insert Kill Buffer" #k"super-rightdown")
82
83
84(bind-key "Insert File" #k"control-x control-r")
85(bind-key "Save File" #k"control-x control-s")
86(bind-key "Visit File" #k"control-x control-v")
87(bind-key "Write File" #k"control-x control-w")
88(bind-key "Find File" #k"control-x control-f")
89(bind-key "Backup File" #k"control-x meta-b")
90;(bind-key "Save All Files" #k"control-x control-m")
91;(bind-key "Save All Files" #k"control-x return")
92;(bind-key "Save All Files and Exit" #k"control-x meta-z")
93
94(bind-key "List Buffers" #k"control-x control-b")
95(bind-key "Buffer Not Modified" #k"meta-~")
96(bind-key "Check Buffer Modified" #k"control-x ~")
97(bind-key "Select Buffer" #k"control-x b")
98;(bind-key "Select Previous Buffer" #k"control-meta-l")
99;(bind-key "Circulate Buffers" #k"control-meta-L")
100;(bind-key "Create Buffer" #k"control-x meta-b")
101;(bind-key "Kill Buffer" #k"control-x k")
102;(bind-key "Select Random Typeout Buffer" #k"hyper-t")
103
104(bind-key "Next Window" #k"control-x n")
105(bind-key "Next Window" #k"control-x o")
106(bind-key "Previous Window" #k"control-x p")
107(bind-key "Split Window" #k"control-x 2")
108;(bind-key "New Window" #k"control-x control-n")
109;(bind-key "Delete Window" #k"control-x d")
110(bind-key "Delete Next Window" #k"control-x 1")
111;(bind-key "Line to Top of Window" #k"meta-!")
112;(bind-key "Line to Center of Window" #k"meta-#")
113;(bind-key "Top of Window" #k"meta-,")
114;(bind-key "Bottom of Window" #k"meta-.")
115
116(bind-key "Exit Hemlock" #k"control-x control-z")
117(bind-key "Exit Recursive Edit" #k"control-meta-z")
118(bind-key "Abort Recursive Edit" #k"control-]")
119
120(bind-key "Delete Previous Character" #k"delete")
121(bind-key "Delete Previous Character" #k"backspace")
122(bind-key "Kill Next Word" #k"meta-d")
123(bind-key "Kill Previous Word" #k"meta-delete")
124(bind-key "Kill Previous Word" #k"meta-backspace")
125(bind-key "Exchange Point and Mark" #k"control-x control-x")
126(bind-key "Mark Whole Buffer" #k"control-x h")
127(bind-key "Set/Pop Mark" #k"control-@")
128(bind-key "Set/Pop Mark" #k"control-space")
129(bind-key "Pop and Goto Mark" #k"meta-@")
130(bind-key "Pop Mark" #k"control-meta-space") ;#k"control-meta-@" = "Mark Form".
131(bind-key "Kill Region" #k"control-w")
132(bind-key "Save Region" #k"meta-w")
133(bind-key "Un-Kill" #k"control-y")
134(bind-key "Rotate Kill Ring" #k"meta-y")
135
136(bind-key "Forward Word" #k"meta-f")
137(bind-key "Backward Word" #k"meta-b")
138
139(bind-key "Forward Paragraph" #k"meta-]")
140(bind-key "Forward Sentence" #k"meta-e")
141(bind-key "Backward Paragraph" #k"meta-[")
142(bind-key "Backward Sentence" #k"meta-a")
143
144(bind-key "Mark Paragraph" #k"meta-h")
145
146(bind-key "Forward Kill Sentence" #k"meta-k")
147(bind-key "Backward Kill Sentence" #k"control-x delete")
148(bind-key "Backward Kill Sentence" #k"control-x backspace")
149
150(bind-key "Beginning of Buffer" #k"meta-\<")
151(bind-key "End of Buffer" #k"meta-\>")
152(bind-key "Mark to Beginning of Buffer" #k"control-\<")
153(bind-key "Mark to End of Buffer" #k"control-\>")
154
155(bind-key "Extended Command" #k"meta-x")
156
157(bind-key "Uppercase Word" #k"meta-u")
158(bind-key "Lowercase Word" #k"meta-l")
159(bind-key "Capitalize Word" #k"meta-c")
160
161(bind-key "Previous Page" #k"control-x [")
162(bind-key "Next Page" #k"control-x ]")
163(bind-key "Mark Page" #k"control-x control-p")
164(bind-key "Count Lines Page" #k"control-x l")
165
166
167
168;;;; Argument Digit and Negative Argument.
169
170(bind-key "Negative Argument" #k"meta-\-")
171(bind-key "Argument Digit" #k"meta-0")
172(bind-key "Argument Digit" #k"meta-1")
173(bind-key "Argument Digit" #k"meta-2")
174(bind-key "Argument Digit" #k"meta-3")
175(bind-key "Argument Digit" #k"meta-4")
176(bind-key "Argument Digit" #k"meta-5")
177(bind-key "Argument Digit" #k"meta-6")
178(bind-key "Argument Digit" #k"meta-7")
179(bind-key "Argument Digit" #k"meta-8")
180(bind-key "Argument Digit" #k"meta-9")
181(bind-key "Negative Argument" #k"control-\-")
182(bind-key "Argument Digit" #k"control-0")
183(bind-key "Argument Digit" #k"control-1")
184(bind-key "Argument Digit" #k"control-2")
185(bind-key "Argument Digit" #k"control-3")
186(bind-key "Argument Digit" #k"control-4")
187(bind-key "Argument Digit" #k"control-5")
188(bind-key "Argument Digit" #k"control-6")
189(bind-key "Argument Digit" #k"control-7")
190(bind-key "Argument Digit" #k"control-8")
191(bind-key "Argument Digit" #k"control-9")
192(bind-key "Negative Argument" #k"control-meta-\-")
193(bind-key "Argument Digit" #k"control-meta-0")
194(bind-key "Argument Digit" #k"control-meta-1")
195(bind-key "Argument Digit" #k"control-meta-2")
196(bind-key "Argument Digit" #k"control-meta-3")
197(bind-key "Argument Digit" #k"control-meta-4")
198(bind-key "Argument Digit" #k"control-meta-5")
199(bind-key "Argument Digit" #k"control-meta-6")
200(bind-key "Argument Digit" #k"control-meta-7")
201(bind-key "Argument Digit" #k"control-meta-8")
202(bind-key "Argument Digit" #k"control-meta-9")
203
204
205;;;; Self Insert and Quoted Insert.
206
207(bind-key "Quoted Insert" #k"control-q")
208
209(bind-key "Self Insert" #k"space")
210(bind-key "Self Insert" #k"!")
211(bind-key "Self Insert" #k"@")
212(bind-key "Self Insert" #k"#")
213(bind-key "Self Insert" #k"$")
214(bind-key "Self Insert" #k"%")
215(bind-key "Self Insert" #k"^")
216(bind-key "Self Insert" #k"&")
217(bind-key "Self Insert" #k"*")
218(bind-key "Self Insert" #k"(")
219(bind-key "Self Insert" #k")")
220(bind-key "Self Insert" #k"_")
221(bind-key "Self Insert" #k"+")
222(bind-key "Self Insert" #k"~")
223(bind-key "Self Insert" #k"1")
224(bind-key "Self Insert" #k"2")
225(bind-key "Self Insert" #k"3")
226(bind-key "Self Insert" #k"4")
227(bind-key "Self Insert" #k"5")
228(bind-key "Self Insert" #k"6")
229(bind-key "Self Insert" #k"7")
230(bind-key "Self Insert" #k"8")
231(bind-key "Self Insert" #k"9")
232(bind-key "Self Insert" #k"0")
233(bind-key "Self Insert" #k"[")
234(bind-key "Self Insert" #k"]")
235(bind-key "Self Insert" #k"\\")
236(bind-key "Self Insert" #k"|")
237(bind-key "Self Insert" #k":")
238(bind-key "Self Insert" #k";")
239(bind-key "Self Insert" #k"\"")
240(bind-key "Self Insert" #k"'")
241(bind-key "Self Insert" #k"\-")
242(bind-key "Self Insert" #k"=")
243(bind-key "Self Insert" #k"`")
244(bind-key "Self Insert" #k"\<")
245(bind-key "Self Insert" #k"\>")
246(bind-key "Self Insert" #k",")
247(bind-key "Self Insert" #k".")
248(bind-key "Self Insert" #k"?")
249(bind-key "Self Insert" #k"/")
250(bind-key "Self Insert" #k"{")
251(bind-key "Self Insert" #k"}")
252
253
254
255;;;; Echo Area.
256
257;;; Basic echo-area commands.
258;;;
259(bind-key "Help on Parse" #k"home" :mode "Echo Area")
260(bind-key "Help on Parse" #k"control-_" :mode "Echo Area")
261
262(bind-key "Complete Keyword" #k"escape" :mode "Echo Area")
263(bind-key "Complete Field" #k"space" :mode "Echo Area")
264(bind-key "Confirm Parse" #k"return" :mode "Echo Area")
265
266;;; Rebind some standard commands to behave better.
267;;;
268(bind-key "Kill Parse" #k"control-u" :mode "Echo Area")
269(bind-key "Insert Parse Default" #k"control-i" :mode "Echo Area")
270(bind-key "Insert Parse Default" #k"tab" :mode "Echo Area")
271(bind-key "Echo Area Delete Previous Character" #k"delete" :mode "Echo Area")
272(bind-key "Echo Area Delete Previous Character" #k"backspace" :mode "Echo Area")
273(bind-key "Echo Area Kill Previous Word" #k"meta-h" :mode "Echo Area")
274(bind-key "Echo Area Kill Previous Word" #k"meta-delete" :mode "Echo Area")
275(bind-key "Echo Area Kill Previous Word" #k"meta-backspace" :mode "Echo Area")
276(bind-key "Echo Area Kill Previous Word" #k"control-w" :mode "Echo Area")
277(bind-key "Beginning of Parse" #k"control-a" :mode "Echo Area")
278(bind-key "Beginning of Parse" #k"meta-\<" :mode "Echo Area")
279(bind-key "Echo Area Backward Character" #k"control-b" :mode "Echo Area")
280(bind-key "Echo Area Backward Word" #k"meta-b" :mode "Echo Area")
281(bind-key "Next Parse" #k"control-n" :mode "Echo Area")
282(bind-key "Previous Parse" #k"control-p" :mode "Echo Area")
283
284;;; Remove some dangerous standard bindings.
285;;;
286(bind-key "Illegal" #k"control-x" :mode "Echo Area")
287(bind-key "Illegal" #k"control-meta-c" :mode "Echo Area")
288(bind-key "Illegal" #k"control-meta-s" :mode "Echo Area")
289(bind-key "Illegal" #k"control-meta-l" :mode "Echo Area")
290(bind-key "Illegal" #k"meta-x" :mode "Echo Area")
291(bind-key "Illegal" #k"control-s" :mode "Echo Area")
292(bind-key "Illegal" #k"control-r" :mode "Echo Area")
293(bind-key "Illegal" #k"hyper-t" :mode "Echo Area")
294(bind-key "Illegal" #k"middledown" :mode "Echo Area")
295(bind-key "Do Nothing" #k"middleup" :mode "Echo Area")
296(bind-key "Illegal" #k"super-leftdown" :mode "Echo Area")
297(bind-key "Do Nothing" #k"super-leftup" :mode "Echo Area")
298(bind-key "Illegal" #k"super-rightdown" :mode "Echo Area")
299(bind-key "Do Nothing" #k"super-rightup" :mode "Echo Area")
300
301
302
303;;;; Listener and Editor Modes.
304(bind-key "Confirm Listener Input" #k"return" :mode "Listener")
305(bind-key "Previous Interactive Input" #k"meta-p" :mode "Listener")
306(bind-key "Previous Interactive Input" #k"meta-g" :mode "Listener")
307(bind-key "Search Previous Interactive Input" #k"meta-P" :mode "Listener")
308(bind-key "Next Interactive Input" #k"meta-n" :mode "Listener")
309(bind-key "Kill Interactive Input" #k"meta-i" :mode "Listener")
310;(bind-key "Abort Eval Input" #k"control-meta-i" :mode "Listener")
311(bind-key "Interactive Beginning of Line" #k"control-a" :mode "Listener")
312(bind-key "POP Or Delete Forward" #k"control-d" :mode "Listener")
313(bind-key "Reenter Interactive Input" #k"control-return" :mode "Listener")
314
315(bind-key "Editor Evaluate Expression" #k"control-meta-escape")
316(bind-key "Editor Evaluate Expression" #k"meta-escape"  :mode "Editor")
317(bind-key "Editor Evaluate Defun" #k"control-x control-e" :mode "Editor")
318(bind-key "Editor Evaluate Region" #k"enter" :mode "Editor")
319(bind-key "Editor Evaluate Defun" #k"control-meta-x" :mode "Editor")
320(bind-key "Editor Compile Defun" #k"control-x control-c" :mode "Editor")
321(bind-key "Editor Compile Defun" #k"control-x control-C" :mode "Editor")
322
323(bind-key "Editor Macroexpand Expression" #k"control-m" :mode "Editor")
324(bind-key "Editor Describe Function Call" #k"control-meta-A" :mode "Editor")
325(bind-key "Editor Describe Symbol" #k"control-meta-S" :mode "Editor")
326
327
328;;;; Typescript.
329#+typescript
330(progn
331(bind-key "Confirm Typescript Input" #k"return" :mode "Typescript")
332(bind-key "Interactive Beginning of Line" #k"control-a" :mode "Typescript")
333(bind-key "Kill Interactive Input" #k"meta-i" :mode "Typescript")
334(bind-key "Previous Interactive Input" #k"meta-p" :mode "Typescript")
335(bind-key "Search Previous Interactive Input" #k"meta-P" :mode "Typescript")
336(bind-key "Next Interactive Input" #k"meta-n" :mode "Typescript")
337(bind-key "Reenter Interactive Input" #k"control-return" :mode "Typescript")
338(bind-key "Typescript Slave Break" #k"hyper-b" :mode "Typescript")
339(bind-key "Typescript Slave to Top Level" #k"hyper-g" :mode "Typescript")
340(bind-key "Typescript Slave Status" #k"hyper-s" :mode "Typescript")
341(bind-key "Select Slave" #k"control-meta-\c")
342(bind-key "Select Background" #k"control-meta-C")
343
344(bind-key "Abort Operations" #k"hyper-a")
345(bind-key "List Operations" #k"hyper-l")
346
347(bind-key "Next Compiler Error" #k"hyper-n")
348(bind-key "Previous Compiler Error" #k"hyper-p")
349)
350
351;;;; Lisp (some).
352
353(bind-key "Indent Form" #k"control-meta-q")
354(bind-key "Fill Lisp Comment Paragraph" #k"meta-q" :mode "Lisp")
355(bind-key "Current Function Arglist" #k"control-x control-a" :mode "Lisp")
356(bind-key "Arglist On Space" #k"Space" :mode "Lisp")
357(bind-key "Defindent" #k"control-meta-#")
358(bind-key "Beginning of Defun" #k"control-meta-[")
359(bind-key "End of Defun" #k"control-meta-]")
360(bind-key "Beginning of Defun" #k"control-meta-a")
361(bind-key "End of Defun" #k"control-meta-e")
362(bind-key "Forward Form" #k"control-meta-f")
363(bind-key "Backward Form" #k"control-meta-b")
364(bind-key "Forward List" #k"control-meta-n")
365(bind-key "Backward List" #k"control-meta-p")
366(bind-key "Transpose Forms" #k"control-meta-t")
367(bind-key "Forward Kill Form" #k"control-meta-k")
368(bind-key "Backward Kill Form" #k"control-meta-backspace")
369(bind-key "Backward Kill Form" #k"control-meta-delete")
370(bind-key "Mark Form" #k"control-meta-@")
371(bind-key "Mark Defun" #k"control-meta-h")
372(bind-key "Insert ()" #k"meta-(")
373(bind-key "Move over )" #k"meta-)")
374(bind-key "Backward Up List" #k"control-meta-(")
375(bind-key "Backward Up List" #k"control-meta-u")
376(bind-key "Forward Up List" #k"control-meta-)")
377(bind-key "Down List" #k"control-meta-d")
378(bind-key "Extract List" #k"control-meta-l")
379;;(bind-key "Lisp Insert )" #k")" :mode "Lisp")
380(bind-key "Delete Previous Character Expanding Tabs" #k"backspace" :mode "Lisp")
381(bind-key "Delete Previous Character Expanding Tabs" #k"delete" :mode "Lisp")
382
383#+listener-bindings
384(progn
385(bind-key "Evaluate Expression" #k"meta-escape")
386(bind-key "Evaluate Defun" #k"control-x control-e")
387(bind-key "Compile Defun" #k"control-x control-c")
388(bind-key "Compile Buffer File" #k"control-x c")
389(bind-key "Macroexpand Expression" #k"control-M")
390
391(bind-key "Describe Function Call" #k"control-meta-A")
392(bind-key "Describe Symbol" #k"control-meta-S")
393)
394
395(bind-key "Goto Definition" #k"meta-.")
396
397#+debugger-bindings
398(progn
399(bind-key "Debug Up" #k"control-meta-hyper-u")
400(bind-key "Debug Down" #k"control-meta-hyper-d")
401(bind-key "Debug Top" #k"control-meta-hyper-t")
402(bind-key "Debug Bottom" #k"control-meta-hyper-b")
403(bind-key "Debug Frame" #k"control-meta-hyper-f")
404(bind-key "Debug Quit" #k"control-meta-hyper-q")
405(bind-key "Debug Go" #k"control-meta-hyper-g")
406(bind-key "Debug Abort" #k"control-meta-hyper-a")
407(bind-key "Debug Restart" #k"control-meta-hyper-r")
408(bind-key "Debug Help" #k"control-meta-hyper-h")
409(bind-key "Debug Error" #k"control-meta-hyper-e")
410(bind-key "Debug Backtrace" #k"control-meta-hyper-B")
411(bind-key "Debug Print" #k"control-meta-hyper-p")
412(bind-key "Debug Verbose Print" #k"control-meta-hyper-P")
413(bind-key "Debug List Locals" #k"control-meta-hyper-l")
414(bind-key "Debug Source" #k"control-meta-hyper-s")
415(bind-key "Debug Edit Source" #k"control-meta-hyper-S")
416(bind-key "Debug Flush Errors" #k"control-meta-hyper-F")
417)
418
419
420;;;; More Miscellaneous bindings.
421
422(bind-key "Open Line" #k"Control-o")
423(bind-key "New Line" #k"return")
424
425(bind-key "Transpose Words" #k"meta-t")
426(bind-key "Transpose Lines" #k"control-x control-t")
427(bind-key "Transpose Regions" #k"control-x t")
428
429(bind-key "Uppercase Region" #k"control-x control-u")
430(bind-key "Lowercase Region" #k"control-x control-l")
431
432(bind-key "Delete Indentation" #k"meta-^")
433(bind-key "Delete Indentation" #k"control-meta-^")
434(bind-key "Delete Horizontal Space" #k"meta-\\")
435(bind-key "Delete Blank Lines" #k"control-x control-o" :global)
436(bind-key "Just One Space" #k"meta-space")
437(bind-key "Back to Indentation" #k"meta-m")
438(bind-key "Back to Indentation" #k"control-meta-m")
439(bind-key "Indent Rigidly" #k"control-x tab")
440(bind-key "Indent Rigidly" #k"control-x control-i")
441
442(bind-key "Indent New Line" #k"linefeed")
443(bind-key "Indent" #k"tab")
444(bind-key "Indent" #k"control-i")
445(bind-key "Indent Region" #k"control-meta-\\")
446(bind-key "Quote Tab" #k"meta-tab")
447
448(bind-key "Directory" #k"control-x control-\d")
449(bind-key "Verbose Directory" #k"control-x control-D")
450
451(bind-key "Activate Region" #k"control-x control-@")
452(bind-key "Activate Region" #k"control-x control-space")
453
454(bind-key "Save Position" #k"control-x s")
455(bind-key "Jump to Saved Position" #k"control-x j")
456(bind-key "Put Register" #k"control-x x")
457(bind-key "Get Register" #k"control-x g")
458
459#+pascal-mode
460(progn
461(bind-key "Delete Previous Character Expanding Tabs" #k"backspace"
462          :mode "Pascal")
463(bind-key "Delete Previous Character Expanding Tabs" #k"delete" :mode "Pascal")
464(bind-key "Scribe Insert Bracket" #k")" :mode "Pascal")
465(bind-key "Scribe Insert Bracket" #k"]" :mode "Pascal")
466(bind-key "Scribe Insert Bracket" #k"}" :mode "Pascal")
467)
468
469
470;;;; Auto Fill Mode.
471
472(bind-key "Fill Paragraph" #k"meta-q")
473(bind-key "Fill Region" #k"meta-g")
474(bind-key "Set Fill Prefix" #k"control-x .")
475(bind-key "Set Fill Column" #k"control-x f")
476(bind-key "Auto Fill Return" #k"return" :mode "Fill")
477(bind-key "Auto Fill Space" #k"space" :mode "Fill")
478(bind-key "Auto Fill Linefeed" #k"linefeed" :mode "Fill")
479
480
481
482;;;; Keyboard macro bindings.
483
484(bind-key "Define Keyboard Macro" #k"control-x (")
485(bind-key "Define Keyboard Macro Key" #k"control-x meta-(")
486(bind-key "End Keyboard Macro" #k"control-x )")
487(bind-key "End Keyboard Macro" #k"control-x hyper-)")
488(bind-key "Last Keyboard Macro" #k"control-x e")
489(bind-key "Keyboard Macro Query" #k"control-x q")
490
491
492;;;; Spell bindings.
493#+spell-mode
494(progn
495(bind-key "Check Word Spelling" #k"meta-$")
496(bind-key "Add Word to Spelling Dictionary" #k"control-x $")
497
498(dolist (info (command-bindings (getstring "Self Insert" *command-names*)))
499  (let* ((key (car info))
500         (key-event (svref key 0))
501         (character (key-event-char key-event)))
502    (unless (or (alpha-char-p character) (eq key-event #k"'"))
503      (bind-key "Auto Check Word Spelling" key :mode "Spell"))))
504(bind-key "Auto Check Word Spelling" #k"return" :mode "Spell")
505(bind-key "Auto Check Word Spelling" #k"tab" :mode "Spell")
506(bind-key "Auto Check Word Spelling" #k"linefeed" :mode "Spell")
507(bind-key "Correct Last Misspelled Word" #k"meta-:")
508(bind-key "Undo Last Spelling Correction" #k"control-x a")
509)
510
511;;;; Overwrite Mode.
512
513(bind-key "Overwrite Delete Previous Character" #k"delete" :mode "Overwrite")
514(bind-key "Overwrite Delete Previous Character" #k"backspace" :mode "Overwrite")
515
516;;; Do up the printing characters ...
517(do ((i 33 (1+ i)))
518    ((= i 126))
519  (let ((key-event (hemlock-ext:char-key-event (code-char i))))
520    (bind-key "Self Overwrite" key-event :mode "Overwrite")))
521
522(bind-key "Self Overwrite" #k"space" :mode "Overwrite")
523
524
525
526;;;; Comment bindings.
527
528(bind-key "Indent for Comment" #k"meta-;")
529(bind-key "Set Comment Column" #k"control-x ;")
530(bind-key "Kill Comment" #k"control-meta-;")
531(bind-key "Down Comment Line" #k"meta-n")
532(bind-key "Up Comment Line" #k"meta-p")
533(bind-key "Indent New Comment Line" #k"meta-j")
534(bind-key "Indent New Comment Line" #k"meta-linefeed")
535
536
537;;;; Word Abbrev Mode.
538
539(bind-key "Add Mode Word Abbrev" #k"control-x control-a")
540(bind-key "Add Global Word Abbrev" #k"control-x +")
541(bind-key "Inverse Add Mode Word Abbrev" #k"control-x control-h")
542(bind-key "Inverse Add Global Word Abbrev" #k"control-x \-")
543;; Removed in lieu of "Pop and Goto Mark".
544;;(bind-key "Abbrev Expand Only" #k"meta-space")
545(bind-key "Word Abbrev Prefix Mark" #k"meta-\"")
546(bind-key "Unexpand Last Word" #k"control-x u")
547
548(dolist (key (list #k"!" #k"~" #k"@" #k"#" #k";" #k"$" #k"%" #k"^" #k"&" #k"*"
549                   #k"\-" #k"_" #k"=" #k"+" #k"[" #k"]" #k"(" #k")" #k"/" #k"|"
550                   #k":" #k"'" #k"\"" #k"{" #k"}" #k"," #k"\<" #k"." #k"\>"
551                   #k"`" #k"\\" #k"?" #k"return" #k"newline" #k"tab" #k"space"))
552  (bind-key "Abbrev Expand Only" key :mode "Abbrev"))
553
554
555
556;;;; Scribe Mode.
557
558#+scribe-mode
559(progn
560(dolist (key (list #k"]" #k")" #k"}" #k"\>"))
561  (bind-key "Scribe Insert Bracket" key :mode "Scribe"))
562
563;;GB (bind-key "Scribe Buffer File" #k"control-x c" :mode "Scribe")
564(bind-key "Select Scribe Warnings" #k"control-meta-C" :mode "Scribe")
565
566(bind-key "Insert Scribe Directive" #k"hyper-i" :mode "Scribe")
567)
568
569
570;;;; X commands:
571
572#+clx
573(progn
574(bind-key "Insert Cut Buffer" #k"insert")
575(bind-key "Region to Cut Buffer" #k"meta-insert")
576)
577
578
579;;;; Mailer commands.
580#+mail-mode
581(progn
582;;; Clear everything user might hit to avoid getting the internal error
583;;; message about modifying read-only buffers.
584;;;
585(hemlock-ext:do-alpha-key-events (key-event :both)
586                                 (bind-key "Illegal" key-event :mode "Headers")
587                                 (bind-key "Illegal" key-event :mode "Message"))
588
589;;; Global.
590;;;
591(bind-key "Incorporate and Read New Mail" #k"control-x i")
592(bind-key "Send Message" #k"control-x m")
593(bind-key "Message Headers" #k"control-x r")
594
595;;; Both Headers and Message modes.
596;;;
597;;; The bindings in these two blocks should be the same, one for "Message" mode
598;;; and one for "Headers" mode.
599;;;
600(bind-key "Next Message" #k"meta-n" :mode "Message")
601(bind-key "Previous Message" #k"meta-p" :mode "Message")
602(bind-key "Next Undeleted Message" #k"n" :mode "Message")
603(bind-key "Previous Undeleted Message" #k"p" :mode "Message")
604(bind-key "Send Message" #k"s" :mode "Message")
605(bind-key "Send Message" #k"m" :mode "Message")
606(bind-key "Forward Message" #k"f" :mode "Message")
607(bind-key "Headers Delete Message" #k"k" :mode "Message")
608(bind-key "Headers Undelete Message" #k"u" :mode "Message")
609(bind-key "Headers Refile Message" #k"o" :mode "Message")
610(bind-key "List Mail Buffers" #k"l" :mode "Message")
611(bind-key "Quit Headers" #k"q" :mode "Message")
612(bind-key "Incorporate and Read New Mail" #k"i" :mode "Message")
613(bind-key "Beginning of Buffer" #k"\<" :mode "Message")
614(bind-key "End of Buffer" #k"\>" :mode "Message")
615;;;
616(bind-key "Next Message" #k"meta-n" :mode "Headers")
617(bind-key "Previous Message" #k"meta-p" :mode "Headers")
618(bind-key "Next Undeleted Message" #k"n" :mode "Headers")
619(bind-key "Previous Undeleted Message" #k"p" :mode "Headers")
620(bind-key "Send Message" #k"s" :mode "Headers")
621(bind-key "Send Message" #k"m" :mode "Headers")
622(bind-key "Forward Message" #k"f" :mode "Headers")
623(bind-key "Headers Delete Message" #k"k" :mode "Headers")
624(bind-key "Headers Undelete Message" #k"u" :mode "Headers")
625(bind-key "Headers Refile Message" #k"o" :mode "Headers")
626(bind-key "List Mail Buffers" #k"l" :mode "Headers")
627(bind-key "Quit Headers" #k"q" :mode "Headers")
628(bind-key "Incorporate and Read New Mail" #k"i" :mode "Headers")
629(bind-key "Beginning of Buffer" #k"\<" :mode "Headers")
630(bind-key "End of Buffer" #k"\>" :mode "Headers")
631
632
633;;; Headers mode.
634;;;
635(bind-key "Delete Message and Down Line" #k"d" :mode "Headers")
636(bind-key "Pick Headers" #k"h" :mode "Headers")
637(bind-key "Show Message" #k"space" :mode "Headers")
638(bind-key "Show Message" #k"." :mode "Headers")
639(bind-key "Reply to Message" #k"r" :mode "Headers")
640(bind-key "Expunge Messages" #k"!" :mode "Headers")
641(bind-key "Headers Help" #k"?" :mode "Headers")
642
643
644;;; Message mode.
645;;;
646(bind-key "Delete Message and Show Next" #k"d" :mode "Message")
647(bind-key "Goto Headers Buffer" #k"^" :mode "Message")
648(bind-key "Scroll Message" #k"space" :mode "Message")
649(bind-key "Scroll Message" #k"control-v" :mode "Message")
650(bind-key "Scroll Window Up" #k"backspace" :mode "Message")
651(bind-key "Scroll Window Up" #k"delete" :mode "Message")
652(bind-key "Reply to Message in Other Window" #k"r" :mode "Message")
653(bind-key "Edit Message Buffer" #k"e" :mode "Message")
654(bind-key "Insert Message Region" #k"hyper-y" :mode "Message")
655(bind-key "Message Help" #k"?" :mode "Message")
656
657
658;;; Draft mode.
659;;;
660(bind-key "Goto Headers Buffer" #k"hyper-^" :mode "Draft")
661(bind-key "Goto Message Buffer" #k"hyper-m" :mode "Draft")
662(bind-key "Deliver Message" #k"hyper-s" :mode "Draft")
663(bind-key "Deliver Message" #k"hyper-c" :mode "Draft")
664(bind-key "Insert Message Buffer" #k"hyper-y" :mode "Draft")
665(bind-key "Delete Draft and Buffer" #k"hyper-q" :mode "Draft")
666(bind-key "List Mail Buffers" #k"hyper-l" :mode "Draft")
667(bind-key "Draft Help" #k"hyper-?" :mode "Draft")
668);#+mail-mode
669
670
671;;;; Netnews.
672
673#+netnews-mode
674(progn
675;;; Clear everything user might hit to avoid getting the internal error
676;;; message about modifying read-only buffers.
677;;;
678(hemlock-ext:do-alpha-key-events (key-event :both)
679                                 (bind-key "Illegal" key-event :mode "News-Headers")
680                                 (bind-key "Illegal" key-event :mode "News-Message"))
681
682
683;;; Global Netnews bindings
684;;;
685(bind-key "Netnews Post Message" #k"C-x P")
686
687
688;;; Both News-Headers and News-Message modes.
689;;;
690;;; The bindings in these two blocks should be the same, one for "News-Message"
691;;; mode and one for "News-Headers" mode.
692;;;
693(bind-key "List All Groups" #k"l" :mode "News-Headers")
694(bind-key "Netnews Append to File" #k"a" :mode "News-Headers")
695(bind-key "Netnews Forward Message" #k"f" :mode "News-Headers")
696(bind-key "Netnews Go to Next Group" #k"g" :mode "News-Headers")
697(bind-key "Netnews Next Article" #k"n" :mode "News-Headers")
698(bind-key "Netnews Previous Article" #k"p" :mode "News-Headers")
699(bind-key "Netnews Quit Starting Here" #k"." :mode "News-Headers")
700(bind-key "Netnews Group Punt Messages" #k"G" :mode "News-Headers")
701(bind-key "Netnews Show Whole Header" #k"w" :mode "News-Headers")
702(bind-key "Netnews Reply to Sender in Other Window" #k"r" :mode "News-Headers")
703(bind-key "Netnews Reply to Group in Other Window" #k"R" :mode "News-Headers")
704;;;
705(bind-key "List All Groups" #k"l" :mode "News-Message")
706(bind-key "Netnews Append to File" #k"a" :mode "News-Message")
707(bind-key "Netnews Forward Message" #k"f" :mode "News-Message")
708(bind-key "Netnews Go to Next Group" #k"g" :mode "News-Message")
709(bind-key "Netnews Next Article" #k"n" :mode "News-Message")
710(bind-key "Netnews Previous Article" #k"p" :mode "News-Message")
711(bind-key "Netnews Quit Starting Here" #k"." :mode "News-Message")
712(bind-key "Netnews Group Punt Messages" #k"G" :mode "News-Message")
713(bind-key "Netnews Show Whole Header" #k"w" :mode "News-Message")
714(bind-key "Netnews Reply to Sender in Other Window" #k"r" :mode "News-Message")
715(bind-key "Netnews Reply to Group in Other Window" #k"R" :mode "News-Message")
716
717
718;;; News-Headers.
719;;;
720(bind-key "Netnews Exit" #k"q" :mode "News-Headers")
721(bind-key "Netnews Headers File Message" #k"o" :mode "News-Headers")
722(bind-key "Netnews Headers Scroll Window Down" #k"c-v" :mode "News-Headers")
723(bind-key "Netnews Headers Scroll Window Up" #k"m-v" :mode "News-Headers")
724(bind-key "Netnews Next Line" #k"C-n" :mode "News-Headers")
725(bind-key "Netnews Next Line" #k"Downarrow" :mode "News-Headers")
726(bind-key "Netnews Previous Line" #k"C-p" :mode "News-Headers")
727(bind-key "Netnews Previous Line" #k"Uparrow" :mode "News-Headers")
728(bind-key "Netnews Select Message Buffer" #k"hyper-m" :mode "News-Headers")
729(bind-key "Netnews Show Article" #k"space" :mode "News-Headers")
730
731
732;;; News-Message.
733;;;
734(bind-key "Insert Message Region" #k"Hyper-y" :mode "News-Message")
735(bind-key "Netnews Message File Message" #k"o" :mode "News-Message")
736(bind-key "Netnews Message Keep Buffer" #k"k" :mode "News-Message")
737(bind-key "Netnews Message Quit" #k"q" :mode "News-Message")
738(bind-key "Netnews Message Scroll Down"  #k"space" :mode "News-Message")
739(bind-key "Netnews Goto Draft Buffer" #k"hyper-d" :mode "News-Message")
740(bind-key "Netnews Goto Headers Buffer" #k"^" :mode "News-Message")
741(bind-key "Netnews Goto Headers Buffer" #k"hyper-h" :mode "News-Message")
742(bind-key "Netnews Goto Post Buffer" #k"hyper-p" :mode "News-Message")
743(bind-key "Scroll Window Up" #k"backspace" :mode "News-Message")
744
745
746;;; Post.
747;;;
748(bind-key "Netnews Select Message Buffer" #k"hyper-m" :mode "Post")
749(bind-key "Netnews Deliver Post" #k"hyper-s" :mode "Post")
750(bind-key "Netnews Abort Post" #k"hyper-q" :mode "Post")
751(bind-key "Insert Message Buffer" #k"Hyper-y" :mode "Post")
752
753
754;;; News-Browse.
755
756(bind-key "Netnews Quit Browse" #k"q" :mode "News-Browse")
757(bind-key "Netnews Browse Add Group To File" #k"a" :mode "News-Browse")
758(bind-key "Netnews Browse Read Group" #k"space" :mode "News-Browse")
759(bind-key "Next Line" #k"n" :mode "News-Browse")
760(bind-key "Previous Line" #k"p" :mode "News-Browse")
761)
762
763;;;; Process (Shell).
764
765#+shell-mode
766(progn
767(bind-key "Shell" #k"control-meta-s")
768(bind-key "Confirm Process Input" #k"return" :mode "Process")
769(bind-key "Shell Complete Filename" #k"M-escape" :mode "Process")
770(bind-key "Interrupt Buffer Subprocess" #k"hyper-c" :mode "Process")
771(bind-key "Stop Buffer Subprocess" #k"hyper-z" :mode "Process")
772(bind-key "Quit Buffer Subprocess" #k"hyper-\\")
773(bind-key "Send EOF to Process" #k"hyper-d")
774
775(bind-key "Previous Interactive Input" #k"meta-p" :mode "Process")
776(bind-key "Search Previous Interactive Input" #k"meta-P" :mode "Process")
777(bind-key "Interactive Beginning of Line" #k"control-a" :mode "Process")
778(bind-key "Kill Interactive Input" #k"meta-i" :mode "Process")
779(bind-key "Next Interactive Input" #k"meta-n" :mode "Process")
780(bind-key "Reenter Interactive Input" #k"control-return" :mode "Process")
781)
782
783;;;; Bufed.
784
785(bind-key "Bufed" #k"control-x control-meta-b")
786(bind-key "Bufed Delete" #k"d" :mode "Bufed")
787(bind-key "Bufed Delete" #k"control-d" :mode "Bufed")
788(bind-key "Bufed Undelete" #k"u" :mode "Bufed")
789(bind-key "Bufed Expunge" #k"!" :mode "Bufed")
790(bind-key "Bufed Quit" #k"q" :mode "Bufed")
791(bind-key "Bufed Goto" #k"space" :mode "Bufed")
792(bind-key "Bufed Goto and Quit" #k"super-leftdown" :mode "Bufed")
793(bind-key "Bufed Save File" #k"s" :mode "Bufed")
794(bind-key "Next Line" #k"n" :mode "Bufed")
795(bind-key "Previous Line" #k"p" :mode "Bufed")
796
797
798(bind-key "Bufed Help" #k"?" :mode "Bufed")
799
800
801
802;;;; Dired.
803#+dired-mode
804(progn
805(bind-key "Dired" #k"control-x control-meta-d")
806
807(bind-key "Dired Delete File and Down Line" #k"d" :mode "Dired")
808(bind-key "Dired Delete File with Pattern" #k"D" :mode "Dired")
809(bind-key "Dired Delete File" #k"control-d" :mode "Dired")
810(bind-key "Dired Delete File" #k"k" :mode "Dired")
811
812(bind-key "Dired Undelete File and Down Line" #k"u" :mode "Dired")
813(bind-key "Dired Undelete File with Pattern" #k"U" :mode "Dired")
814(bind-key "Dired Undelete File" #k"control-u" :mode "Dired")
815
816(bind-key "Dired Expunge Files" #k"!" :mode "Dired")
817(bind-key "Dired Update Buffer" #k"hyper-u" :mode "Dired")
818(bind-key "Dired View File" #k"space" :mode "Dired")
819(bind-key "Dired Edit File" #k"e" :mode "Dired")
820(bind-key "Dired Up Directory" #k"^" :mode "Dired")
821(bind-key "Dired Quit" #k"q" :mode "Dired")
822(bind-key "Dired Help" #k"?" :mode "Dired")
823
824(bind-key "Dired Copy File" #k"c" :mode "Dired")
825(bind-key "Dired Copy with Wildcard" #k"C" :mode "Dired")
826(bind-key "Dired Rename File" #k"r" :mode "Dired")
827(bind-key "Dired Rename with Wildcard" #k"R" :mode "Dired")
828
829(bind-key "Next Line" #k"n" :mode "Dired")
830(bind-key "Previous Line" #k"p" :mode "Dired")
831)
832
833;;;; View Mode.
834#+view-mode
835(progn
836(bind-key "View Scroll Down" #k"space" :mode "View")
837(bind-key "Scroll Window Up" #k"b" :mode "View")
838(bind-key "Scroll Window Up" #k"backspace" :mode "View")
839(bind-key "Scroll Window Up" #k"delete" :mode "View")
840(bind-key "View Return" #k"^" :mode "View")
841(bind-key "View Quit" #k"q" :mode "View")
842(bind-key "View Edit File" #k"e" :mode "View")
843(bind-key "View Help" #k"?" :mode "View")
844(bind-key "Beginning of Buffer" #k"\<" :mode "View")
845(bind-key "End of Buffer" #k"\>" :mode "View")
846)
847
848;;;; Lisp Library.
849
850(bind-key "Describe Pointer Library Entry" #k"leftdown" :mode "Lisp-Lib")
851(bind-key "Load Pointer Library Entry" #k"rightdown" :mode "Lisp-Lib")
852(bind-key "Describe Library Entry" #k"space" :mode "Lisp-Lib")
853(bind-key "Load Library Entry" #k"l" :mode "Lisp-Lib")
854(bind-key "Exit Lisp Library" #k"q" :mode "Lisp-Lib")
855(bind-key "Lisp Library Help" #k"?" :mode "Lisp-Lib")
856
857
858;;;; Completion mode.
859
860(dolist (c (command-bindings (getstring "Self Insert" *command-names*)))
861  (bind-key "Completion Self Insert" (car c) :mode "Completion"))
862
863(bind-key "Completion Self Insert" #k"space" :mode "Completion")
864(bind-key "Completion Self Insert" #k"tab" :mode "Completion")
865(bind-key "Completion Self Insert" #k"return" :mode "Completion")
866(bind-key "Completion Self Insert" #k"linefeed" :mode "Completion")
867
868(bind-key "Completion Complete Word" #k"end")
869(bind-key "Completion Rotate Completions" #k"meta-end")
870
871
872
873;;;; Caps-Lock mode.
874
875(hemlock-ext:do-alpha-key-events (key-event :lower)
876                                 (bind-key "Self Insert Caps Lock" key-event :mode "CAPS-LOCK"))
877
878
879;;;; Logical characters.
880
881(setf (logical-key-event-p #k"control-s" :forward-search) t)
882(setf (logical-key-event-p #k"control-r" :backward-search) t)
883(setf (logical-key-event-p #k"control-r" :recursive-edit) t)
884(setf (logical-key-event-p #k"delete" :cancel) t)
885(setf (logical-key-event-p #k"backspace" :cancel) t)
886(setf (logical-key-event-p #k"control-g" :abort) t)
887(setf (logical-key-event-p #k"escape" :exit) t)
888(setf (logical-key-event-p #k"y" :yes) t)
889(setf (logical-key-event-p #k"space" :yes) t)
890(setf (logical-key-event-p #k"n" :no) t)
891(setf (logical-key-event-p #k"backspace" :no) t)
892(setf (logical-key-event-p #k"delete" :no) t)
893(setf (logical-key-event-p #k"!" :do-all) t)
894(setf (logical-key-event-p #k"." :do-once) t)
895(setf (logical-key-event-p #k"home" :help) t)
896(setf (logical-key-event-p #k"h" :help) t)
897(setf (logical-key-event-p #k"?" :help) t)
898(setf (logical-key-event-p #k"control-_" :help) t)
899(setf (logical-key-event-p #k"return" :confirm) t)
900(setf (logical-key-event-p #k"control-q" :quote) t)
901(setf (logical-key-event-p #k"k" :keep) t)
Note: See TracBrowser for help on using the repository browser.