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

  ViewVC Help
Powered by ViewVC 1.1.5