/[cmucl]/src/hemlock/bindings.lisp
ViewVC logotype

Contents of /src/hemlock/bindings.lisp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2.1.2 - (hide annotations) (vendor branch)
Mon Sep 10 00:55:55 1990 UTC (23 years, 7 months ago) by wlott
Changes since 1.2.1.1: +2 -2 lines
Enabled all the mailer commands.
1 ram 1.1 ;;; -*- Log: hemlock.log; Package: Hemlock -*-
2     ;;;
3     ;;; **********************************************************************
4     ;;; This code was written as part of the Spice Lisp project at
5     ;;; Carnegie-Mellon University, and has been placed in the public domain.
6     ;;; Spice Lisp is currently incomplete and under active development.
7     ;;; If you want to use this code or any part of Spice Lisp, please contact
8     ;;; Scott Fahlman (FAHLMAN@CMUC).
9     ;;; **********************************************************************
10     ;;;
11     ;;; Some bindings:
12     ;;;
13     (in-package 'hemlock)
14    
15    
16    
17     ;;;; Default key translations:
18    
19 ram 1.2 ;;; This page defines prefix characters that set specified modifier bits on
20     ;;; the next character typed.
21 ram 1.1 ;;;
22 ram 1.2 (setf (key-translation #k"escape") '(:bits :meta))
23     (setf (key-translation #k"control-z") '(:bits :control :meta))
24     (setf (key-translation #k"control-Z") '(:bits :control :meta))
25     (setf (key-translation #k"control-^") '(:bits :control))
26     (setf (key-translation #k"control-c") '(:bits :hyper))
27     (setf (key-translation #k"control-C") '(:bits :hyper))
28 ram 1.1
29    
30    
31     ;;;; Most every binding.
32    
33     ;;; Self insert letters:
34     ;;;
35 ram 1.2 (do-alpha-key-events (key-event :both)
36     (bind-key "Self Insert" key-event))
37 ram 1.1
38 ram 1.2 (bind-key "Beginning of Line" #k"control-a")
39     (bind-key "Delete Next Character" #k"control-d")
40     (bind-key "End of Line" #k"control-e")
41     (bind-key "Forward Character" #k"control-f")
42     (bind-key "Forward Character" #k"rightarrow")
43     (bind-key "Backward Character" #k"control-b")
44     (bind-key "Backward Character" #k"leftarrow")
45     (bind-key "Kill Line" #k"control-k")
46     (bind-key "Refresh Screen" #k"control-l")
47     (bind-key "Next Line" #k"control-n")
48     (bind-key "Next Line" #k"downarrow")
49     (bind-key "Previous Line" #k"control-p")
50     (bind-key "Previous Line" #k"uparrow")
51     (bind-key "Query Replace" #k"meta-%")
52     (bind-key "Reverse Incremental Search" #k"control-r")
53     (bind-key "Incremental Search" #k"control-s")
54     (bind-key "Forward Search" #k"meta-s")
55     (bind-key "Reverse Search" #k"meta-r")
56     (bind-key "Transpose Characters" #k"control-t")
57     (bind-key "Universal Argument" #k"control-u")
58     (bind-key "Scroll Window Down" #k"control-v")
59     (bind-key "Scroll Window Up" #k"meta-v")
60     (bind-key "Scroll Next Window Down" #k"control-meta-v")
61     (bind-key "Scroll Next Window Up" #k"control-meta-V")
62 ram 1.1
63 ram 1.2 (bind-key "Help" #k"home")
64     (bind-key "Help" #k"control-_")
65     (bind-key "Describe Key" #k"meta-?")
66 ram 1.1
67    
68 ram 1.2 (bind-key "Here to Top of Window" #k"leftdown")
69     (bind-key "Do Nothing" #k"leftup")
70     (bind-key "Top Line to Here" #k"rightdown")
71     (bind-key "Do Nothing" #k"rightup")
72     (bind-key "Point to Here" #k"middledown")
73     (bind-key "Point to Here" #k"super-leftdown")
74     (bind-key "Generic Pointer Up" #k"middleup")
75     (bind-key "Generic Pointer Up" #k"super-leftup")
76     (bind-key "Do Nothing" #k"super-rightup")
77     (bind-key "Insert Kill Buffer" #k"super-rightdown")
78 ram 1.1
79    
80 ram 1.2 (bind-key "Insert File" #k"control-x control-r")
81     (bind-key "Save File" #k"control-x control-s")
82     (bind-key "Visit File" #k"control-x control-v")
83     (bind-key "Write File" #k"control-x control-w")
84     (bind-key "Find File" #k"control-x control-f")
85     (bind-key "Backup File" #k"control-x meta-b")
86     (bind-key "Save All Files" #k"control-x control-m")
87     (bind-key "Save All Files" #k"control-x return")
88     (bind-key "Save All Files and Exit" #k"control-x meta-z")
89 ram 1.1
90 ram 1.2 (bind-key "List Buffers" #k"control-x control-b")
91     (bind-key "Buffer Not Modified" #k"meta-~")
92     (bind-key "Check Buffer Modified" #k"control-x ~")
93     (bind-key "Select Buffer" #k"control-x b")
94     (bind-key "Select Previous Buffer" #k"control-meta-l")
95     (bind-key "Circulate Buffers" #k"control-meta-L")
96     (bind-key "Create Buffer" #k"control-x meta-b")
97     (bind-key "Kill Buffer" #k"control-x k")
98     (bind-key "Select Random Typeout Buffer" #k"hyper-t")
99 ram 1.1
100 ram 1.2 (bind-key "Next Window" #k"control-x n")
101     (bind-key "Next Window" #k"control-x o")
102     (bind-key "Previous Window" #k"control-x p")
103     (bind-key "Split Window" #k"control-x 2")
104     (bind-key "New Window" #k"control-x control-n")
105     (bind-key "Delete Window" #k"control-x d")
106     (bind-key "Delete Next Window" #k"control-x 1")
107     (bind-key "Line to Top of Window" #k"meta-!")
108     (bind-key "Line to Center of Window" #k"meta-#")
109     (bind-key "Top of Window" #k"meta-,")
110     (bind-key "Bottom of Window" #k"meta-.")
111 ram 1.1
112 ram 1.2 (bind-key "Exit Hemlock" #k"control-x control-z")
113     (bind-key "Exit Recursive Edit" #k"control-meta-z")
114     (bind-key "Abort Recursive Edit" #k"control-]")
115 ram 1.1
116 ram 1.2 (bind-key "Delete Previous Character" #k"delete")
117     (bind-key "Delete Previous Character" #k"backspace")
118     (bind-key "Kill Next Word" #k"meta-d")
119     (bind-key "Kill Previous Word" #k"meta-delete")
120     (bind-key "Kill Previous Word" #k"meta-backspace")
121     (bind-key "Exchange Point and Mark" #k"control-x control-x")
122     (bind-key "Mark Whole Buffer" #k"control-x h")
123     (bind-key "Set/Pop Mark" #k"control-@")
124     (bind-key "Set/Pop Mark" #k"control-space")
125     (bind-key "Pop and Goto Mark" #k"meta-space")
126     (bind-key "Pop and Goto Mark" #k"meta-@")
127     (bind-key "Pop Mark" #k"control-meta-space") ;#k"control-meta-@" = "Mark Form".
128     (bind-key "Kill Region" #k"control-w")
129     (bind-key "Save Region" #k"meta-w")
130     (bind-key "Un-Kill" #k"control-y")
131     (bind-key "Rotate Kill Ring" #k"meta-y")
132 ram 1.1
133 ram 1.2 (bind-key "Forward Word" #k"meta-f")
134     (bind-key "Backward Word" #k"meta-b")
135 ram 1.1
136 ram 1.2 (bind-key "Forward Paragraph" #k"meta-]")
137     (bind-key "Forward Sentence" #k"meta-e")
138     (bind-key "Backward Paragraph" #k"meta-[")
139     (bind-key "Backward Sentence" #k"meta-a")
140 ram 1.1
141 ram 1.2 (bind-key "Mark Paragraph" #k"meta-h")
142 ram 1.1
143 ram 1.2 (bind-key "Forward Kill Sentence" #k"meta-k")
144     (bind-key "Backward Kill Sentence" #k"control-x delete")
145     (bind-key "Backward Kill Sentence" #k"control-x backspace")
146 ram 1.1
147 ram 1.2 (bind-key "Beginning of Buffer" #k"meta-\<")
148     (bind-key "End of Buffer" #k"meta-\>")
149     (bind-key "Mark to Beginning of Buffer" #k"control-\<")
150     (bind-key "Mark to End of Buffer" #k"control-\>")
151 ram 1.1
152 ram 1.2 (bind-key "Extended Command" #k"meta-x")
153 ram 1.1
154 ram 1.2 (bind-key "Uppercase Word" #k"meta-u")
155     (bind-key "Lowercase Word" #k"meta-l")
156     (bind-key "Capitalize Word" #k"meta-c")
157 ram 1.1
158 ram 1.2 (bind-key "Previous Page" #k"control-x ["))
159     (bind-key "Next Page" #k"control-x ]"))
160     (bind-key "Mark Page" #k"control-x control-p")
161     (bind-key "Count Lines Page" #k"control-x l")
162 ram 1.1
163    
164    
165     ;;;; Argument Digit and Negative Argument.
166    
167 ram 1.2 (bind-key "Negative Argument" #k"meta-\-")
168     (bind-key "Argument Digit" #k"meta-0")
169     (bind-key "Argument Digit" #k"meta-1")
170     (bind-key "Argument Digit" #k"meta-2")
171     (bind-key "Argument Digit" #k"meta-3")
172     (bind-key "Argument Digit" #k"meta-4")
173     (bind-key "Argument Digit" #k"meta-5")
174     (bind-key "Argument Digit" #k"meta-6")
175     (bind-key "Argument Digit" #k"meta-7")
176     (bind-key "Argument Digit" #k"meta-8")
177     (bind-key "Argument Digit" #k"meta-9")
178     (bind-key "Negative Argument" #k"control-\-")
179     (bind-key "Argument Digit" #k"control-0")
180     (bind-key "Argument Digit" #k"control-1")
181     (bind-key "Argument Digit" #k"control-2")
182     (bind-key "Argument Digit" #k"control-3")
183     (bind-key "Argument Digit" #k"control-4")
184     (bind-key "Argument Digit" #k"control-5")
185     (bind-key "Argument Digit" #k"control-6")
186     (bind-key "Argument Digit" #k"control-7")
187     (bind-key "Argument Digit" #k"control-8")
188     (bind-key "Argument Digit" #k"control-9")
189     (bind-key "Negative Argument" #k"control-meta-\-")
190     (bind-key "Argument Digit" #k"control-meta-0")
191     (bind-key "Argument Digit" #k"control-meta-1")
192     (bind-key "Argument Digit" #k"control-meta-2")
193     (bind-key "Argument Digit" #k"control-meta-3")
194     (bind-key "Argument Digit" #k"control-meta-4")
195     (bind-key "Argument Digit" #k"control-meta-5")
196     (bind-key "Argument Digit" #k"control-meta-6")
197     (bind-key "Argument Digit" #k"control-meta-7")
198     (bind-key "Argument Digit" #k"control-meta-8")
199     (bind-key "Argument Digit" #k"control-meta-9")
200 ram 1.1
201    
202     ;;;; Self Insert and Quoted Insert.
203    
204 ram 1.2 (bind-key "Quoted Insert" #k"control-q")
205 ram 1.1
206 ram 1.2 (bind-key "Self Insert" #k"space")
207     (bind-key "Self Insert" #k"!")
208     (bind-key "Self Insert" #k"@")
209     (bind-key "Self Insert" #k"#")
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"1")
221     (bind-key "Self Insert" #k"2")
222     (bind-key "Self Insert" #k"3")
223     (bind-key "Self Insert" #k"4")
224     (bind-key "Self Insert" #k"5")
225     (bind-key "Self Insert" #k"6")
226     (bind-key "Self Insert" #k"7")
227     (bind-key "Self Insert" #k"8")
228     (bind-key "Self Insert" #k"9")
229     (bind-key "Self Insert" #k"0")
230     (bind-key "Self Insert" #k"[")
231     (bind-key "Self Insert" #k"]")
232     (bind-key "Self Insert" #k"\\")
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 ram 1.1
250    
251    
252     ;;;; Echo Area.
253    
254     ;;; Basic echo-area commands.
255     ;;;
256 ram 1.2 (bind-key "Help on Parse" #k"home" :mode "Echo Area")
257     (bind-key "Help on Parse" #k"control-_" :mode "Echo Area")
258 ram 1.1
259 ram 1.2 (bind-key "Complete Keyword" #k"escape" :mode "Echo Area")
260     (bind-key "Complete Field" #k"space" :mode "Echo Area")
261     (bind-key "Confirm Parse" #k"return" :mode "Echo Area")
262 ram 1.1
263     ;;; Rebind some standard commands to behave better.
264     ;;;
265 ram 1.2 (bind-key "Kill Parse" #k"control-u" :mode "Echo Area")
266     (bind-key "Insert Parse Default" #k"control-i" :mode "Echo Area")
267     (bind-key "Insert Parse Default" #k"tab" :mode "Echo Area")
268     (bind-key "Echo Area Delete Previous Character" #k"delete" :mode "Echo Area")
269     (bind-key "Echo Area Delete Previous Character" #k"backspace" :mode "Echo Area")
270     (bind-key "Echo Area Kill Previous Word" #k"meta-h" :mode "Echo Area")
271     (bind-key "Echo Area Kill Previous Word" #k"meta-delete" :mode "Echo Area")
272     (bind-key "Echo Area Kill Previous Word" #k"meta-backspace" :mode "Echo Area")
273     (bind-key "Echo Area Kill Previous Word" #k"control-w" :mode "Echo Area")
274     (bind-key "Beginning of Parse" #k"control-a" :mode "Echo Area")
275     (bind-key "Beginning of Parse" #k"meta-\<" :mode "Echo Area")
276     (bind-key "Echo Area Backward Character" #k"control-b" :mode "Echo Area")
277     (bind-key "Echo Area Backward Word" #k"meta-b" :mode "Echo Area")
278     (bind-key "Next Parse" #k"control-n" :mode "Echo Area")
279     (bind-key "Previous Parse" #k"control-p" :mode "Echo Area")
280 ram 1.1
281 ram 1.2 ;;; Remove some dangerous standard bindings.
282 ram 1.1 ;;;
283 ram 1.2 (bind-key "Illegal" #k"control-x" :mode "Echo Area")
284     (bind-key "Illegal" #k"control-meta-c" :mode "Echo Area")
285     (bind-key "Illegal" #k"control-meta-l" :mode "Echo Area")
286     (bind-key "Illegal" #k"meta-x" :mode "Echo Area")
287     (bind-key "Illegal" #k"control-s" :mode "Echo Area")
288     (bind-key "Illegal" #k"control-r" :mode "Echo Area")
289     (bind-key "Illegal" #k"hyper-t" :mode "Echo Area")
290     (bind-key "Illegal" #k"middledown" :mode "Echo Area")
291     (bind-key "Do Nothing" #k"middleup" :mode "Echo Area")
292     (bind-key "Illegal" #k"super-leftdown" :mode "Echo Area")
293     (bind-key "Do Nothing" #k"super-leftup" :mode "Echo Area")
294     (bind-key "Illegal" #k"super-rightdown" :mode "Echo Area")
295     (bind-key "Do Nothing" #k"super-rightup" :mode "Echo Area")
296 ram 1.1
297    
298    
299     ;;;; Eval and Editor Modes.
300    
301 ram 1.2 (bind-key "Confirm Eval Input" #k"return" :mode "Eval")
302     (bind-key "Previous Interactive Input" #k"meta-p" :mode "Eval")
303     (bind-key "Search Previous Interactive Input" #k"meta-P" :mode "Eval")
304     (bind-key "Next Interactive Input" #k"meta-n" :mode "Eval")
305     (bind-key "Kill Interactive Input" #k"meta-i" :mode "Eval")
306     (bind-key "Abort Eval Input" #k"control-meta-i" :mode "Eval")
307     (bind-key "Interactive Beginning of Line" #k"control-a" :mode "Eval")
308     (bind-key "Reenter Interactive Input" #k"control-return" :mode "Eval")
309 ram 1.1
310 ram 1.2 (bind-key "Editor Evaluate Expression" #k"control-meta-escape")
311     (bind-key "Editor Evaluate Expression" #k"meta-escape" :mode "Editor")
312     (bind-key "Editor Evaluate Defun" #k"control-x control-e" :mode "Editor")
313     (bind-key "Editor Compile Defun" #k"control-x control-c" :mode "Editor")
314     (bind-key "Editor Compile Defun" #k"control-x control-C" :mode "Editor")
315     (bind-key "Editor Macroexpand Expression" #k"control-m" :mode "Editor")
316     (bind-key "Editor Describe Function Call" #k"control-meta-A" :mode "Editor")
317     (bind-key "Editor Describe Symbol" #k"control-meta-S" :mode "Editor")
318 ram 1.1
319    
320    
321     ;;;; Typescript.
322    
323 ram 1.2 (bind-key "Confirm Typescript Input" #k"return" :mode "Typescript")
324     (bind-key "Interactive Beginning of Line" #k"control-a" :mode "Typescript")
325     (bind-key "Kill Interactive Input" #k"meta-i" :mode "Typescript")
326     (bind-key "Previous Interactive Input" #k"meta-p" :mode "Typescript")
327     (bind-key "Search Previous Interactive Input" #k"meta-P" :mode "Typescript")
328     (bind-key "Next Interactive Input" #k"meta-n" :mode "Typescript")
329     (bind-key "Reenter Interactive Input" #k"control-return" :mode "Typescript")
330     (bind-key "Typescript Slave Break" #k"hyper-b" :mode "Typescript")
331     (bind-key "Typescript Slave to Top Level" #k"hyper-g" :mode "Typescript")
332     (bind-key "Select Slave" #k"control-meta-\c")
333     (bind-key "Select Background" #k"control-meta-C")
334 ram 1.1
335 ram 1.2 (bind-key "Abort Operations" #k"hyper-a")
336     (bind-key "List Operations" #k"hyper-l")
337 ram 1.1
338 ram 1.2 (bind-key "Next Compiler Error" #k"hyper-n")
339     (bind-key "Previous Compiler Error" #k"hyper-p")
340 ram 1.1
341    
342    
343     ;;;; Lisp (some).
344    
345 ram 1.2 (bind-key "Indent Form" #k"control-meta-q")
346     (bind-key "Defindent" #k"control-meta-#")
347     (bind-key "Beginning of Defun" #k"control-meta-[")
348     (bind-key "End of Defun" #k"control-meta-]")
349     (bind-key "Beginning of Defun" #k"control-meta-a")
350     (bind-key "End of Defun" #k"control-meta-e")
351     (bind-key "Forward Form" #k"control-meta-f")
352     (bind-key "Backward Form" #k"control-meta-b")
353     (bind-key "Forward List" #k"control-meta-n")
354     (bind-key "Backward List" #k"control-meta-p")
355     (bind-key "Transpose Forms" #k"control-meta-t")
356     (bind-key "Forward Kill Form" #k"control-meta-k")
357     (bind-key "Backward Kill Form" #k"control-meta-backspace")
358     (bind-key "Backward Kill Form" #k"control-meta-delete")
359     (bind-key "Mark Form" #k"control-meta-@")
360     (bind-key "Mark Defun" #k"control-meta-h")
361     (bind-key "Insert ()" #k"meta-(")
362     (bind-key "Move over )" #k"meta-)")
363     (bind-key "Backward Up List" #k"control-meta-(")
364     (bind-key "Backward Up List" #k"control-meta-u")
365     (bind-key "Forward Up List" #k"control-meta-)")
366     (bind-key "Down List" #k"control-meta-d")
367     (bind-key "Extract List" #k"control-meta-x")
368     (bind-key "Lisp Insert )" #k")" :mode "Lisp")
369     (bind-key "Delete Previous Character Expanding Tabs" #k"backspace" :mode "Lisp")
370     (bind-key "Delete Previous Character Expanding Tabs" #k"delete" :mode "Lisp")
371 ram 1.1
372 ram 1.2 (bind-key "Evaluate Expression" #k"meta-escape")
373     (bind-key "Evaluate Defun" #k"control-x control-e")
374     (bind-key "Compile Defun" #k"control-x control-c")
375     (bind-key "Compile Buffer File" #k"control-x c")
376     (bind-key "Macroexpand Expression" #k"control-M")
377 ram 1.1
378 ram 1.2 (bind-key "Describe Function Call" #k"control-meta-A")
379     (bind-key "Describe Symbol" #k"control-meta-S")
380 ram 1.1
381 ram 1.2 (bind-key "Goto Definition" #k"control-meta-F")
382 ram 1.1
383    
384    
385     ;;;; More Miscellaneous bindings.
386    
387 ram 1.2 (bind-key "Open Line" #k"Control-o")
388     (bind-key "New Line" #k"return")
389 ram 1.1
390 ram 1.2 (bind-key "Transpose Words" #k"meta-t")
391     (bind-key "Transpose Lines" #k"control-x control-t")
392     (bind-key "Transpose Regions" #k"control-x t"))
393 ram 1.1
394 ram 1.2 (bind-key "Uppercase Region" #k"control-x control-u")
395     (bind-key "Lowercase Region" #k"control-x control-l")
396 ram 1.1
397 ram 1.2 (bind-key "Delete Indentation" #k"meta-^")
398     (bind-key "Delete Indentation" #k"control-meta-^")
399     (bind-key "Delete Horizontal Space" #k"meta-\\")
400     (bind-key "Delete Blank Lines" #k"control-x control-o" :global)
401     (bind-key "Just One Space" #k"meta-\|")
402     (bind-key "Back to Indentation" #k"meta-m")
403     (bind-key "Back to Indentation" #k"control-meta-m")
404     (bind-key "Indent Rigidly" #k"control-x tab")
405     (bind-key "Indent Rigidly" #k"control-x control-i")
406 ram 1.1
407 ram 1.2 (bind-key "Indent New Line" #k"linefeed")
408     (bind-key "Indent" #k"tab")
409     (bind-key "Indent" #k"control-i")
410     (bind-key "Indent Region" #k"control-meta-\\")
411     (bind-key "Quote Tab" #k"meta-tab")
412 ram 1.1
413 ram 1.2 (bind-key "Directory" #k"control-x control-\d")
414     (bind-key "Verbose Directory" #k"control-x control-D")
415 ram 1.1
416 ram 1.2 (bind-key "Activate Region" #k"control-x control-@")
417     (bind-key "Activate Region" #k"control-x control-space")
418 ram 1.1
419 ram 1.2 (bind-key "Save Position" #k"control-x s")
420     (bind-key "Jump to Saved Position" #k"control-x j")
421     (bind-key "Put Register" #k"control-x x")
422     (bind-key "Get Register" #k"control-x g")
423 ram 1.1
424 ram 1.2 (bind-key "Delete Previous Character Expanding Tabs" #k"backspace"
425     :mode "Pascal")
426     (bind-key "Delete Previous Character Expanding Tabs" #k"delete" :mode "Pascal")
427     (bind-key "Scribe Insert Bracket" #k")" :mode "Pascal")
428     (bind-key "Scribe Insert Bracket" #k"]" :mode "Pascal")
429     (bind-key "Scribe Insert Bracket" #k"}" :mode "Pascal")
430 ram 1.1
431    
432     ;;;; Auto Fill Mode.
433    
434 ram 1.2 (bind-key "Fill Paragraph" #k"meta-q")
435     (bind-key "Fill Region" #k"meta-g")
436     (bind-key "Set Fill Prefix" #k"control-x ."))
437     (bind-key "Set Fill Column" #k"control-x f")
438     (bind-key "Auto Fill Return" #k"return" :mode "Fill")
439     (bind-key "Auto Fill Space" #k"space" :mode "Fill")
440     (bind-key "Auto Fill Linefeed" #k"linefeed" :mode "Fill")
441 ram 1.1
442    
443    
444     ;;;; Keyboard macro bindings.
445    
446 ram 1.2 (bind-key "Define Keyboard Macro" #k"control-x (")
447     (bind-key "Define Keyboard Macro Key" #k"control-x meta-(")
448     (bind-key "End Keyboard Macro" #k"control-x )")
449     (bind-key "End Keyboard Macro" #k"control-x hyper-)")
450     (bind-key "Last Keyboard Macro" #k"control-x e")
451     (bind-key "Keyboard Macro Query" #k"control-x q")
452 ram 1.1
453    
454    
455     ;;;; Spell bindings.
456    
457 ram 1.2 (bind-key "Check Word Spelling" #k"meta-$")
458     (bind-key "Add Word to Spelling Dictionary" #k"control-x $")
459 ram 1.1
460 ram 1.2 (dolist (info (command-bindings (getstring "Self Insert" *command-names*)))
461     (let* ((key-event (car info))
462     (character (key-event-char (svref (car info) 0))))
463     (unless (or (alpha-char-p character) (eq key-event #k"'"))
464     (bind-key "Auto Check Word Spelling" (car info) :mode "Spell"))))
465     (bind-key "Auto Check Word Spelling" #k"return" :mode "Spell")
466     (bind-key "Auto Check Word Spelling" #k"tab" :mode "Spell")
467     (bind-key "Auto Check Word Spelling" #k"linefeed" :mode "Spell")
468     (bind-key "Correct Last Misspelled Word" #k"meta-:")
469     (bind-key "Undo Last Spelling Correction" #k"control-x a")
470 ram 1.1
471    
472    
473     ;;;; Overwrite Mode.
474    
475 ram 1.2 (bind-key "Overwrite Delete Previous Character" #k"delete" :mode "Overwrite")
476     (bind-key "Overwrite Delete Previous Character" #k"backspace" :mode "Overwrite")
477 ram 1.1
478 ram 1.2 ;;; Do up the printing characters ...
479     (do ((i 33 (1+ i)))
480     ((= i 126))
481     (let ((key-event (char-key-event (code-char i))))
482     (bind-key "Self Overwrite" key-event :mode "Overwrite")))
483 ram 1.1
484 ram 1.2 (bind-key "Self Overwrite" #k"space" :mode "Overwrite")
485 ram 1.1
486    
487    
488     ;;;; Comment bindings.
489    
490 ram 1.2 (bind-key "Indent for Comment" #k"meta-;")
491     (bind-key "Set Comment Column" #k"control-x ;")
492     (bind-key "Kill Comment" #k"control-meta-;")
493     (bind-key "Down Comment Line" #k"meta-n")
494     (bind-key "Up Comment Line" #k"meta-p")
495     (bind-key "Indent New Comment Line" #k"meta-j")
496     (bind-key "Indent New Comment Line" #k"meta-linefeed")
497 ram 1.1
498    
499     ;;;; Word Abbrev Mode.
500    
501 ram 1.2 (bind-key "Add Mode Word Abbrev" #k"control-x control-a")
502     (bind-key "Add Global Word Abbrev" #k"control-x +")
503     (bind-key "Inverse Add Mode Word Abbrev" #k"control-x control-h")
504     (bind-key "Inverse Add Global Word Abbrev" #k"control-x \-")
505 ram 1.1 ;; Removed in lieu of "Pop and Goto Mark".
506 ram 1.2 ;;(bind-key "Abbrev Expand Only" #k"meta-space")
507     (bind-key "Word Abbrev Prefix Mark" #k"meta-\"")
508     (bind-key "Unexpand Last Word" #k"control-x u")
509 ram 1.1
510 ram 1.2 (dolist (key (list #k"!" #k"~" #k"@" #k"#" #k";" #k"$" #k"%" #k"^" #k"&" #k"*"
511     #k"\-" #k"_" #k"=" #k"+" #k"[" #k"]" #k"(" #k")" #k"/" #k"|"
512     #k":" #k"'" #k"\"" #k"{" #k"}" #k"," #k"\<" #k"." #k"\>"
513     #k"`" #k"\\" #k"?" #k"return" #k"newline" #k"tab" #k"space"))
514     (bind-key "Abbrev Expand Only" key :mode "Abbrev"))
515 ram 1.1
516    
517    
518     ;;;; Scribe Mode.
519    
520 ram 1.2 (dolist (key (list #k"]" #k")" #k"}" #k"\>"))
521     (bind-key "Scribe Insert Bracket" key :mode "Scribe"))
522 ram 1.1
523 ram 1.2 (bind-key "Scribe Buffer File" #k"control-x c" :mode "Scribe")
524     (bind-key "Select Scribe Warnings" #k"control-meta-C" :mode "Scribe")
525 ram 1.1
526 ram 1.2 (bind-key "Insert Scribe Directive" #k"hyper-i" :mode "Scribe")
527 ram 1.1
528    
529    
530     ;;;; X commands:
531    
532 ram 1.2 (bind-key "Insert Cut Buffer" #k"insert")
533     (bind-key "Region to Cut Buffer" #k"meta-insert")
534 ram 1.1
535    
536    
537 wlott 1.2.1.2 ;;;; Mailer commands.
538 ram 1.1
539 ram 1.2 (do-alpha-key-events (key-event :both)
540     (bind-key "Illegal" key-event :mode "Headers")
541     (bind-key "Illegal" key-event :mode "Message"))
542 ram 1.1
543    
544     ;;; Global.
545    
546 ram 1.2 (bind-key "Incorporate and Read New Mail" #k"control-x i")
547     (bind-key "Send Message" #k"control-x m")
548     (bind-key "Message Headers" #k"control-x r")
549 ram 1.1
550    
551     ;;; Both Headers and Message modes.
552     ;;;
553     ;;; The bindings in these two blocks should be the same, one for "Message" mode
554     ;;; and one for "Headers" mode.
555     ;;;
556    
557 ram 1.2 (bind-key "Next Message" #k"meta-n" :mode "Message")
558     (bind-key "Previous Message" #k"meta-p" :mode "Message")
559     (bind-key "Next Undeleted Message" #k"n" :mode "Message")
560     (bind-key "Previous Undeleted Message" #k"p" :mode "Message")
561     (bind-key "Send Message" #k"s" :mode "Message")
562     (bind-key "Send Message" #k"m" :mode "Message")
563     (bind-key "Forward Message" #k"f" :mode "Message")
564     (bind-key "Headers Delete Message" #k"k" :mode "Message")
565     (bind-key "Headers Undelete Message" #k"u" :mode "Message")
566     (bind-key "Headers Refile Message" #k"o" :mode "Message")
567     (bind-key "List Mail Buffers" #k"l" :mode "Message")
568     (bind-key "Quit Headers" #k"q" :mode "Message")
569     (bind-key "Incorporate and Read New Mail" #k"i" :mode "Message")
570     (bind-key "Beginning of Buffer" #k"\<" :mode "Message")
571     (bind-key "End of Buffer" #k"\>" :mode "Message")
572 ram 1.1
573 ram 1.2 (bind-key "Next Message" #k"meta-n" :mode "Headers")
574     (bind-key "Previous Message" #k"meta-p" :mode "Headers")
575     (bind-key "Next Undeleted Message" #k"n" :mode "Headers")
576     (bind-key "Previous Undeleted Message" #k"p" :mode "Headers")
577     (bind-key "Send Message" #k"s" :mode "Headers")
578     (bind-key "Send Message" #k"m" :mode "Headers")
579     (bind-key "Forward Message" #k"f" :mode "Headers")
580     (bind-key "Headers Delete Message" #k"k" :mode "Headers")
581     (bind-key "Headers Undelete Message" #k"u" :mode "Headers")
582     (bind-key "Headers Refile Message" #k"o" :mode "Headers")
583     (bind-key "List Mail Buffers" #k"l" :mode "Headers")
584     (bind-key "Quit Headers" #k"q" :mode "Headers")
585     (bind-key "Incorporate and Read New Mail" #k"i" :mode "Headers")
586     (bind-key "Beginning of Buffer" #k"\<" :mode "Headers")
587     (bind-key "End of Buffer" #k"\>" :mode "Headers")
588 ram 1.1
589    
590     ;;; Headers mode.
591    
592 ram 1.2 (bind-key "Delete Message and Down Line" #k"d" :mode "Headers")
593     (bind-key "Pick Headers" #k"h" :mode "Headers")
594     (bind-key "Show Message" #k"space" :mode "Headers")
595     (bind-key "Show Message" #k"." :mode "Headers")
596     (bind-key "Reply to Message" #k"r" :mode "Headers")
597     (bind-key "Expunge Messages" #k"!" :mode "Headers")
598     (bind-key "Headers Help" #k"?" :mode "Headers")
599 ram 1.1
600    
601     ;;; Message mode.
602    
603 ram 1.2 (bind-key "Delete Message and Show Next" #k"d" :mode "Message")
604     (bind-key "Goto Headers Buffer" #k"^" :mode "Message")
605     (bind-key "Scroll Message" #k"space" :mode "Message")
606     (bind-key "Scroll Message" #k"control-v" :mode "Message")
607     (bind-key "Scroll Window Up" #k"backspace" :mode "Message")
608     (bind-key "Scroll Window Up" #k"delete" :mode "Message")
609     (bind-key "Reply to Message in Other Window" #k"r" :mode "Message")
610     (bind-key "Edit Message Buffer" #k"e" :mode "Message")
611     (bind-key "Insert Message Region" #k"hyper-y" :mode "Message")
612     (bind-key "Message Help" #k"?" :mode "Message")
613 ram 1.1
614    
615     ;;; Draft mode.
616    
617 ram 1.2 (bind-key "Goto Headers Buffer" #k"hyper-^" :mode "Draft")
618     (bind-key "Goto Message Buffer" #k"hyper-m" :mode "Draft")
619     (bind-key "Deliver Message" #k"hyper-s" :mode "Draft")
620     (bind-key "Deliver Message" #k"hyper-c" :mode "Draft")
621     (bind-key "Insert Message Buffer" #k"hyper-y" :mode "Draft")
622     (bind-key "Delete Draft and Buffer" #k"hyper-q" :mode "Draft")
623     (bind-key "List Mail Buffers" #k"hyper-l" :mode "Draft")
624     (bind-key "Draft Help" #k"hyper-?" :mode "Draft")
625 wlott 1.2.1.2
626 ram 1.1
627    
628     ;;;; Process (Shell).
629    
630 ram 1.2 (bind-key "Confirm Process Input" #k"return" :mode "Process")
631     (bind-key "Shell" #k"control-meta-s")
632     (bind-key "Interrupt Buffer Subprocess" #k"hyper-c" :mode "Process")
633     (bind-key "Stop Buffer Subprocess" #k"hyper-z" :mode "Process")
634     (bind-key "Quit Buffer Subprocess" #k"hyper-\\")
635     (bind-key "Send EOF to Process" #k"hyper-d")
636 ram 1.1
637 ram 1.2 (bind-key "Previous Interactive Input" #k"meta-p" :mode "Process")
638     (bind-key "Search Previous Interactive Input" #k"meta-P" :mode "Process")
639     (bind-key "Interactive Beginning of Line" #k"control-a" :mode "Process")
640     (bind-key "Kill Interactive Input" #k"meta-i" :mode "Process")
641     (bind-key "Next Interactive Input" #k"meta-n" :mode "Process")
642     (bind-key "Reenter Interactive Input" #k"control-return" :mode "Process")
643 ram 1.1
644    
645    
646     ;;;; Bufed.
647    
648 ram 1.2 (bind-key "Bufed" #k"control-x control-meta-b"))
649     (bind-key "Bufed Delete" #k"d" :mode "Bufed")
650     (bind-key "Bufed Delete" #k"control-d" :mode "Bufed")
651     (bind-key "Bufed Undelete" #k"u" :mode "Bufed")
652     (bind-key "Bufed Expunge" #k"!" :mode "Bufed")
653     (bind-key "Bufed Quit" #k"q" :mode "Bufed")
654     (bind-key "Bufed Goto" #k"space" :mode "Bufed")
655     (bind-key "Bufed Goto and Quit" #k"super-leftdown" :mode "Bufed")
656     (bind-key "Bufed Save File" #k"s" :mode "Bufed")
657     (bind-key "Next Line" #k"n" :mode "Bufed")
658     (bind-key "Previous Line" #k"p" :mode "Bufed")
659 ram 1.1
660    
661 ram 1.2 (bind-key "Bufed Help" #k"?" :mode "Bufed")
662 ram 1.1
663    
664    
665     ;;;; Dired.
666    
667 ram 1.2 (bind-key "Dired" #k"control-x control-meta-d"))
668 ram 1.1
669 ram 1.2 (bind-key "Dired Delete File and Down Line" #k"d" :mode "Dired")
670     (bind-key "Dired Delete File with Pattern" #k"D" :mode "Dired")
671     (bind-key "Dired Delete File" #k"control-d" :mode "Dired")
672     (bind-key "Dired Delete File" #k"k" :mode "Dired")
673 ram 1.1
674 ram 1.2 (bind-key "Dired Undelete File and Down Line" #k"u" :mode "Dired")
675     (bind-key "Dired Undelete File with Pattern" #k"U" :mode "Dired")
676     (bind-key "Dired Undelete File" #k"control-u" :mode "Dired")
677 ram 1.1
678 ram 1.2 (bind-key "Dired Expunge Files" #k"!" :mode "Dired")
679     (bind-key "Dired Update Buffer" #k"hyper-u" :mode "Dired")
680     (bind-key "Dired View File" #k"space" :mode "Dired")
681     (bind-key "Dired Edit File" #k"e" :mode "Dired")
682     (bind-key "Dired Up Directory" #k"^" :mode "Dired")
683     (bind-key "Dired Quit" #k"q" :mode "Dired")
684     (bind-key "Dired Help" #k"?" :mode "Dired")
685 ram 1.1
686 ram 1.2 (bind-key "Dired Copy File" #k"c" :mode "Dired")
687     (bind-key "Dired Copy with Wildcard" #k"C" :mode "Dired")
688     (bind-key "Dired Rename File" #k"r" :mode "Dired")
689     (bind-key "Dired Rename with Wildcard" #k"R" :mode "Dired")
690 ram 1.1
691 ram 1.2 (bind-key "Next Line" #k"n" :mode "Dired")
692     (bind-key "Previous Line" #k"p" :mode "Dired")
693 ram 1.1
694    
695    
696     ;;;; View Mode.
697    
698 ram 1.2 (bind-key "View Scroll Down" #k"space" :mode "View")
699     (bind-key "Scroll Window Up" #k"b" :mode "View")
700     (bind-key "Scroll Window Up" #k"backspace" :mode "View")
701     (bind-key "Scroll Window Up" #k"delete" :mode "View")
702     (bind-key "View Return" #k"^" :mode "View")
703     (bind-key "View Quit" #k"q" :mode "View")
704     (bind-key "View Edit File" #k"e" :mode "View")
705     (bind-key "View Help" #k"?" :mode "View")
706     (bind-key "Beginning of Buffer" #k"\<" :mode "View")
707     (bind-key "End of Buffer" #k"\>" :mode "View")
708 ram 1.1
709    
710    
711     ;;;; Lisp Library.
712    
713    
714 ram 1.2 (bind-key "Describe Pointer Library Entry" #k"leftdown" :mode "Lisp-Lib")
715     (bind-key "Load Pointer Library Entry" #k"rightdown" :mode "Lisp-Lib")
716     (bind-key "Describe Library Entry" #k"space" :mode "Lisp-Lib")
717     (bind-key "Load Library Entry" #k"l" :mode "Lisp-Lib")
718     (bind-key "Exit Lisp Library" #k"q" :mode "Lisp-Lib")
719     (bind-key "Lisp Library Help" #k"?" :mode "Lisp-Lib")
720 ram 1.1
721    
722    
723     ;;;; Completion mode.
724    
725     (dolist (c (command-bindings (getstring "Self Insert" *command-names*)))
726     (bind-key "Completion Self Insert" (car c) :mode "Completion"))
727    
728 ram 1.2 (bind-key "Completion Self Insert" #k"space" :mode "Completion")
729     (bind-key "Completion Self Insert" #k"tab" :mode "Completion")
730     (bind-key "Completion Self Insert" #k"return" :mode "Completion")
731     (bind-key "Completion Self Insert" #k"linefeed" :mode "Completion")
732 ram 1.1
733 ram 1.2 (bind-key "Completion Complete Word" #k"end")
734     (bind-key "Completion Rotate Completions" #k"meta-end")
735 ram 1.1
736    
737    
738 ram 1.2 ;;;; Caps-Lock mode.
739 ram 1.1
740 ram 1.2 (do-alpha-key-events (key-event :lower)
741     (bind-key "Self Insert Caps Lock" key-event :mode "CAPS-LOCK"))
742 ram 1.1
743    
744 ram 1.2
745     ;;;; Logical characters.
746    
747     (setf (logical-key-event-p #k"control-s" :forward-search) t)
748     (setf (logical-key-event-p #k"control-r" :backward-search) t)
749     (setf (logical-key-event-p #k"control-r" :recursive-edit) t)
750     (setf (logical-key-event-p #k"delete" :cancel) t)
751     (setf (logical-key-event-p #k"backspace" :cancel) t)
752     (setf (logical-key-event-p #k"control-g" :abort) t)
753     (setf (logical-key-event-p #k"escape" :exit) t)
754     (setf (logical-key-event-p #k"y" :yes) t)
755     (setf (logical-key-event-p #k"space" :yes) t)
756     (setf (logical-key-event-p #k"n" :no) t)
757     (setf (logical-key-event-p #k"backspace" :no) t)
758     (setf (logical-key-event-p #k"delete" :no) t)
759     (setf (logical-key-event-p #k"!" :do-all) t)
760     (setf (logical-key-event-p #k"." :do-once) t)
761     (setf (logical-key-event-p #k"home" :help) t)
762     (setf (logical-key-event-p #k"h" :help) t)
763     (setf (logical-key-event-p #k"?" :help) t)
764     (setf (logical-key-event-p #k"control-_" :help) t)
765     (setf (logical-key-event-p #k"return" :confirm) t)
766     (setf (logical-key-event-p #k"control-q" :quote) t)
767     (setf (logical-key-event-p #k"k" :keep) t)

  ViewVC Help
Powered by ViewVC 1.1.5