/[linedit]/src/command-keys.lisp
ViewVC logotype

Contents of /src/command-keys.lisp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.9 - (show annotations)
Sun Apr 25 15:03:26 2004 UTC (9 years, 11 months ago) by nsiivola
Branch: MAIN
CVS Tags: HEAD
Changes since 1.8: +1 -1 lines
* <blush>Type Julian's name correctly</blush>
1 ;;;; Copyright (c) 2003, 2004 Nikodemus Siivola, Julian Squires
2 ;;;;
3 ;;;; Permission is hereby granted, free of charge, to any person obtaining
4 ;;;; a copy of this software and associated documentation files (the
5 ;;;; "Software"), to deal in the Software without restriction, including
6 ;;;; without limitation the rights to use, copy, modify, merge, publish,
7 ;;;; distribute, sublicense, and/or sell copies of the Software, and to
8 ;;;; permit persons to whom the Software is furnished to do so, subject to
9 ;;;; the following conditions:
10 ;;;;
11 ;;;; The above copyright notice and this permission notice shall be included
12 ;;;; in all copies or substantial portions of the Software.
13 ;;;;
14 ;;;; THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15 ;;;; EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16 ;;;; MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
17 ;;;; IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
18 ;;;; CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
19 ;;;; TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
20 ;;;; SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21
22 (in-package :linedit)
23
24 (defvar *commands* (make-hash-table :test #'equalp))
25
26 (defmacro defcommand (command &optional action)
27 (when action
28 `(setf (gethash ,command *commands*) ,action)))
29
30 (defcommand "C-A" 'move-to-bol)
31 (defcommand "C-B" 'move-char-left)
32 (defcommand "C-C" 'interrupt-lisp)
33 (defcommand "C-D" 'delete-char-forwards-or-eof)
34 (defcommand "C-E" 'move-to-eol)
35 (defcommand "C-F" 'move-char-right)
36 (defcommand "C-G")
37 (defcommand "C-J")
38 (defcommand "C-K" 'kill-to-eol)
39 (defcommand "C-L")
40 (defcommand "C-N" 'history-next)
41 (defcommand "C-O" 'close-all-sexp)
42 (defcommand "C-P" 'history-previous)
43 (defcommand "C-Q")
44 (defcommand "C-R")
45 (defcommand "C-S")
46 (defcommand "C-T")
47 (defcommand "C-U" 'kill-to-bol)
48 (defcommand "C-V")
49 (defcommand "C-W" 'cut-region)
50 (defcommand "C-X")
51 (defcommand "C-Y" 'yank)
52 (defcommand "C-Z" 'stop-lisp)
53 (defcommand "C--" 'undo)
54
55 (defcommand "M-A" 'apropos-word)
56 (defcommand "M-B" 'move-word-backwards)
57 (defcommand "M-C")
58 (defcommand "M-D" 'downcase-word)
59 (defcommand "M-E")
60 (defcommand "M-F" 'move-word-forwards)
61 (defcommand "M-G")
62 (defcommand "M-H" 'help)
63 (defcommand "M-I" 'describe-word)
64 (defcommand "M-J")
65 (defcommand "M-K")
66 (defcommand "M-L")
67 (defcommand "M-M")
68 (defcommand "M-N")
69 (defcommand "M-O")
70 (defcommand "M-P")
71 (defcommand "M-Q")
72 (defcommand "M-R")
73 (defcommand "M-S")
74 (defcommand "M-T")
75 (defcommand "M-U" 'upcase-word)
76 (defcommand "M-V")
77 (defcommand "M-W" 'copy-region)
78 (defcommand "M-X")
79 (defcommand "M-Y" 'yank-cycle)
80 (defcommand "M-Z")
81 (defcommand "M-1")
82 (defcommand "M-2")
83 (defcommand "M-3")
84 (defcommand "M-4")
85 (defcommand "M-5")
86 (defcommand "M-6")
87 (defcommand "M-7")
88 (defcommand "M-8")
89 (defcommand "M-9")
90 (defcommand "M-0")
91
92 (defcommand "C-M-b" 'backward-sexp)
93 (defcommand "C-M-f" 'forward-sexp)
94 (defcommand "C-M-k" 'kill-sexp)
95
96 (defcommand "C-Space" 'set-mark)
97 (defcommand "C-Backspace" 'delete-word-backwards)
98
99 (defcommand "Tab" 'complete)
100 (defcommand "Backspace" 'delete-char-backwards)
101 (defcommand "Return" 'finish-input)
102
103 (defcommand "Up-arrow" 'history-previous)
104 (defcommand "Down-arrow" 'history-next)
105 (defcommand "Right-arrow" 'move-char-right)
106 (defcommand "Left-arrow" 'move-char-left)
107 (defcommand "Insert" 'toggle-insert)
108 (defcommand "Delete" 'delete-char-forwards)
109 (defcommand "C-Delete")
110 (defcommand "Page-up")
111 (defcommand "Page-down")
112 (defcommand "Home" 'move-to-bol)
113 (defcommand "End" 'move-to-eol)

  ViewVC Help
Powered by ViewVC 1.1.5