home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Source Code 1993 July / THE_SOURCE_CODE_CD_ROM.iso / languages / elisp / packages / fix-my-terminal / keypad.elc < prev    next >
Emacs Compiled Lisp  |  1993-03-23  |  2.6 KB

open in: MacOS 8.1     |     Win98     |     DOS

view JSON data     |     view as text


This file was processed as: Emacs Compiled Lisp (other/emacsCompiledLisp).
This format is not currently supported by dexvert.

ConfidenceProgramDetectionMatch TypeSupport
1% dexvert Emacs Compiled Lisp (other/emacsCompiledLisp) magic Unsupported
1% dexvert Combustion 2 Particle Library (other/combustion2ParticleLibrary) ext Unsupported
100% file Emacs v18 byte-compiled Lisp data default
99% file data default
100% gt2 Kopftext: '(defun keypad-default (char definition) (byte-code ' default (weak)
100% xdgMime text/x-emacs-lisp default (weak)



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 0a 28 64 65 66 75 6e 20 | 6b 65 79 70 61 64 2d 64 |.(defun |keypad-d|
|00000010| 65 66 61 75 6c 74 20 28 | 63 68 61 72 20 64 65 66 |efault (|char def|
|00000020| 69 6e 69 74 69 6f 6e 29 | 20 28 62 79 74 65 2d 63 |inition)| (byte-c|
|00000030| 6f 64 65 20 22 c3 08 09 | 5c 22 86 0c 00 c4 08 09 |ode "...|\"......|
|00000040| 0a 23 87 22 20 5b 66 75 | 6e 63 74 69 6f 6e 2d 6b |.#." [fu|nction-k|
|00000050| 65 79 6d 61 70 20 63 68 | 61 72 20 64 65 66 69 6e |eymap ch|ar defin|
|00000060| 69 74 69 6f 6e 20 6c 6f | 6f 6b 75 70 2d 6b 65 79 |ition lo|okup-key|
|00000070| 20 64 65 66 69 6e 65 2d | 6b 65 79 5d 20 35 29 29 | define-|key] 5))|
|00000080| 0a 0a 28 6b 65 79 70 61 | 64 2d 64 65 66 61 75 6c |..(keypa|d-defaul|
|00000090| 74 20 22 6c 22 20 28 71 | 75 6f 74 65 20 62 61 63 |t "l" (q|uote bac|
|000000a0| 6b 77 61 72 64 2d 63 68 | 61 72 29 29 0a 0a 28 6b |kward-ch|ar))..(k|
|000000b0| 65 79 70 61 64 2d 64 65 | 66 61 75 6c 74 20 22 72 |eypad-de|fault "r|
|000000c0| 22 20 28 71 75 6f 74 65 | 20 66 6f 72 77 61 72 64 |" (quote| forward|
|000000d0| 2d 63 68 61 72 29 29 0a | 0a 28 6b 65 79 70 61 64 |-char)).|.(keypad|
|000000e0| 2d 64 65 66 61 75 6c 74 | 20 22 44 22 20 28 71 75 |-default| "D" (qu|
|000000f0| 6f 74 65 20 64 65 6c 65 | 74 65 2d 63 68 61 72 29 |ote dele|te-char)|
|00000100| 29 0a 0a 28 6b 65 79 70 | 61 64 2d 64 65 66 61 75 |)..(keyp|ad-defau|
|00000110| 6c 74 20 22 75 22 20 28 | 71 75 6f 74 65 20 70 72 |lt "u" (|quote pr|
|00000120| 65 76 69 6f 75 73 2d 6c | 69 6e 65 29 29 0a 0a 28 |evious-l|ine))..(|
|00000130| 6b 65 79 70 61 64 2d 64 | 65 66 61 75 6c 74 20 22 |keypad-d|efault "|
|00000140| 64 22 20 28 71 75 6f 74 | 65 20 6e 65 78 74 2d 6c |d" (quot|e next-l|
|00000150| 69 6e 65 29 29 0a 0a 28 | 6b 65 79 70 61 64 2d 64 |ine))..(|keypad-d|
|00000160| 65 66 61 75 6c 74 20 22 | 4e 22 20 28 71 75 6f 74 |efault "|N" (quot|
|00000170| 65 20 73 63 72 6f 6c 6c | 2d 75 70 29 29 0a 0a 28 |e scroll|-up))..(|
|00000180| 6b 65 79 70 61 64 2d 64 | 65 66 61 75 6c 74 20 22 |keypad-d|efault "|
|00000190| 50 22 20 28 71 75 6f 74 | 65 20 73 63 72 6f 6c 6c |P" (quot|e scroll|
|000001a0| 2d 64 6f 77 6e 29 29 0a | 0a 28 6b 65 79 70 61 64 |-down)).|.(keypad|
|000001b0| 2d 64 65 66 61 75 6c 74 | 20 22 43 22 20 28 71 75 |-default| "C" (qu|
|000001c0| 6f 74 65 20 72 65 63 65 | 6e 74 65 72 29 29 0a 0a |ote rece|nter))..|
|000001d0| 28 6b 65 79 70 61 64 2d | 64 65 66 61 75 6c 74 20 |(keypad-|default |
|000001e0| 22 3f 22 20 28 71 75 6f | 74 65 20 68 65 6c 70 2d |"?" (quo|te help-|
|000001f0| 66 6f 72 2d 68 65 6c 70 | 29 29 0a 0a 28 6b 65 79 |for-help|))..(key|
|00000200| 70 61 64 2d 64 65 66 61 | 75 6c 74 20 22 73 22 20 |pad-defa|ult "s" |
|00000210| 28 71 75 6f 74 65 20 73 | 65 74 2d 6d 61 72 6b 2d |(quote s|et-mark-|
|00000220| 63 6f 6d 6d 61 6e 64 29 | 29 0a 0a 28 6b 65 79 70 |command)|)..(keyp|
|00000230| 61 64 2d 64 65 66 61 75 | 6c 74 20 22 6b 22 20 28 |ad-defau|lt "k" (|
|00000240| 71 75 6f 74 65 20 6b 69 | 6c 6c 2d 72 65 67 69 6f |quote ki|ll-regio|
|00000250| 6e 29 29 0a 0a 28 6b 65 | 79 70 61 64 2d 64 65 66 |n))..(ke|ypad-def|
|00000260| 61 75 6c 74 20 22 66 22 | 20 28 71 75 6f 74 65 20 |ault "f"| (quote |
|00000270| 72 65 2d 73 65 61 72 63 | 68 2d 66 6f 72 77 61 72 |re-searc|h-forwar|
|00000280| 64 29 29 0a 0a 28 6b 65 | 79 70 61 64 2d 64 65 66 |d))..(ke|ypad-def|
|00000290| 61 75 6c 74 20 22 78 22 | 20 28 71 75 6f 74 65 20 |ault "x"| (quote |
|000002a0| 65 78 65 63 75 74 65 2d | 65 78 74 65 6e 64 65 64 |execute-|extended|
|000002b0| 2d 63 6f 6d 6d 61 6e 64 | 29 29 0a 0a 28 6b 65 79 |-command|))..(key|
|000002c0| 70 61 64 2d 64 65 66 61 | 75 6c 74 20 22 01 22 20 |pad-defa|ult "." |
|000002d0| 28 71 75 6f 74 65 20 62 | 65 67 69 6e 6e 69 6e 67 |(quote b|eginning|
|000002e0| 2d 6f 66 2d 6c 69 6e 65 | 29 29 0a 0a 28 6b 65 79 |-of-line|))..(key|
|000002f0| 70 61 64 2d 64 65 66 61 | 75 6c 74 20 22 02 22 20 |pad-defa|ult "." |
|00000300| 28 71 75 6f 74 65 20 65 | 6e 64 2d 6f 66 2d 6c 69 |(quote e|nd-of-li|
|00000310| 6e 65 29 29 0a 0a 28 6b | 65 79 70 61 64 2d 64 65 |ne))..(k|eypad-de|
|00000320| 66 61 75 6c 74 20 22 03 | 22 20 28 71 75 6f 74 65 |fault ".|" (quote|
|00000330| 20 69 73 65 61 72 63 68 | 2d 66 6f 72 77 61 72 64 | isearch|-forward|
|00000340| 29 29 0a 0a 28 6b 65 79 | 70 61 64 2d 64 65 66 61 |))..(key|pad-defa|
|00000350| 75 6c 74 20 22 04 22 20 | 28 71 75 6f 74 65 20 6b |ult "." |(quote k|
|00000360| 69 6c 6c 2d 6c 69 6e 65 | 29 29 0a 0a 28 6b 65 79 |ill-line|))..(key|
|00000370| 70 61 64 2d 64 65 66 61 | 75 6c 74 20 22 0c 22 20 |pad-defa|ult "." |
|00000380| 28 71 75 6f 74 65 20 66 | 69 6c 6c 2d 70 61 72 61 |(quote f|ill-para|
|00000390| 67 72 61 70 68 29 29 0a | 0a 28 6b 65 79 70 61 64 |graph)).|.(keypad|
|000003a0| 2d 64 65 66 61 75 6c 74 | 20 22 0d 22 20 28 71 75 |-default| "." (qu|
|000003b0| 6f 74 65 20 66 69 6c 6c | 2d 72 65 67 69 6f 6e 29 |ote fill|-region)|
|000003c0| 29 0a 0a 28 6b 65 79 70 | 61 64 2d 64 65 66 61 75 |)..(keyp|ad-defau|
|000003d0| 6c 74 20 22 0e 22 20 28 | 71 75 6f 74 65 20 73 65 |lt "." (|quote se|
|000003e0| 74 2d 66 69 6c 6c 2d 70 | 72 65 66 69 78 29 29 0a |t-fill-p|refix)).|
|000003f0| 0a 28 6b 65 79 70 61 64 | 2d 64 65 66 61 75 6c 74 |.(keypad|-default|
|00000400| 20 22 2e 22 20 28 71 75 | 6f 74 65 20 64 65 6c 65 | "." (qu|ote dele|
|00000410| 74 65 2d 63 68 61 72 29 | 29 0a 0a 28 6b 65 79 70 |te-char)|)..(keyp|
|00000420| 61 64 2d 64 65 66 61 75 | 6c 74 20 22 30 22 20 28 |ad-defau|lt "0" (|
|00000430| 71 75 6f 74 65 20 79 61 | 6e 6b 29 29 0a 0a 28 6b |quote ya|nk))..(k|
|00000440| 65 79 70 61 64 2d 64 65 | 66 61 75 6c 74 20 22 65 |eypad-de|fault "e|
|00000450| 22 20 28 71 75 6f 74 65 | 20 6f 70 65 6e 2d 6c 69 |" (quote| open-li|
|00000460| 6e 65 29 29 0a 0a 28 6b | 65 79 70 61 64 2d 64 65 |ne))..(k|eypad-de|
|00000470| 66 61 75 6c 74 20 22 31 | 22 20 28 71 75 6f 74 65 |fault "1|" (quote|
|00000480| 20 62 61 63 6b 77 61 72 | 64 2d 77 6f 72 64 29 29 | backwar|d-word))|
|00000490| 0a 0a 28 6b 65 79 70 61 | 64 2d 64 65 66 61 75 6c |..(keypa|d-defaul|
|000004a0| 74 20 22 33 22 20 28 71 | 75 6f 74 65 20 66 6f 72 |t "3" (q|uote for|
|000004b0| 77 61 72 64 2d 77 6f 72 | 64 29 29 0a 0a 28 6b 65 |ward-wor|d))..(ke|
|000004c0| 79 70 61 64 2d 64 65 66 | 61 75 6c 74 20 22 37 22 |ypad-def|ault "7"|
|000004d0| 20 28 71 75 6f 74 65 20 | 62 61 63 6b 77 61 72 64 | (quote |backward|
|000004e0| 2d 70 61 72 61 67 72 61 | 70 68 29 29 0a 0a 28 6b |-paragra|ph))..(k|
|000004f0| 65 79 70 61 64 2d 64 65 | 66 61 75 6c 74 20 22 39 |eypad-de|fault "9|
|00000500| 22 20 28 71 75 6f 74 65 | 20 66 6f 72 77 61 72 64 |" (quote| forward|
|00000510| 2d 70 61 72 61 67 72 61 | 70 68 29 29 0a 0a 28 6b |-paragra|ph))..(k|
|00000520| 65 79 70 61 64 2d 64 65 | 66 61 75 6c 74 20 22 68 |eypad-de|fault "h|
|00000530| 22 20 28 71 75 6f 74 65 | 20 6d 6f 76 65 2d 74 6f |" (quote| move-to|
|00000540| 2d 77 69 6e 64 6f 77 2d | 6c 69 6e 65 29 29 0a 0a |-window-|line))..|
|00000550| 28 64 65 66 75 6e 20 73 | 65 74 75 70 2d 74 65 72 |(defun s|etup-ter|
|00000560| 6d 69 6e 61 6c 2d 6b 65 | 79 6d 61 70 20 28 6d 61 |minal-ke|ymap (ma|
|00000570| 70 20 74 72 61 6e 73 6c | 61 74 69 6f 6e 73 29 20 |p transl|ations) |
|00000580| 22 5c 0a 53 65 74 20 75 | 70 20 6b 65 79 6d 61 70 |"\.Set u|p keymap|
|00000590| 20 4d 41 50 20 74 6f 20 | 66 6f 72 77 61 72 64 20 | MAP to |forward |
|000005a0| 74 6f 20 66 75 6e 63 74 | 69 6f 6e 2d 6b 65 79 6d |to funct|ion-keym|
|000005b0| 61 70 20 61 63 63 6f 72 | 64 69 6e 67 20 74 6f 20 |ap accor|ding to |
|000005c0| 54 52 41 4e 53 4c 41 54 | 49 4f 4e 53 2e 0a 54 52 |TRANSLAT|IONS..TR|
|000005d0| 41 4e 53 4c 41 54 49 4f | 4e 53 20 69 73 20 61 6e |ANSLATIO|NS is an|
|000005e0| 20 61 6c 69 73 74 3b 20 | 65 61 63 68 20 65 6c 65 | alist; |each ele|
|000005f0| 6d 65 6e 74 20 6f 66 20 | 69 74 20 6c 6f 6f 6b 73 |ment of |it looks|
|00000600| 20 6c 69 6b 65 20 28 46 | 52 4f 4d 53 54 52 49 4e | like (F|ROMSTRIN|
|00000610| 47 20 2e 20 54 4f 43 48 | 41 52 29 2e 0a 46 6f 72 |G . TOCH|AR)..For|
|00000620| 20 65 61 63 68 20 73 75 | 63 68 20 70 61 69 72 2c | each su|ch pair,|
|00000630| 20 77 65 20 64 65 66 69 | 6e 65 20 74 68 65 20 6b | we defi|ne the k|
|00000640| 65 79 20 73 65 71 75 65 | 6e 63 65 20 46 52 4f 4d |ey seque|nce FROM|
|00000650| 53 54 52 49 4e 47 20 69 | 6e 20 4d 41 50 0a 74 6f |STRING i|n MAP.to|
|00000660| 20 66 6f 72 77 61 72 64 | 20 74 6f 20 74 68 65 20 | forward| to the |
|00000670| 64 65 66 69 6e 69 74 69 | 6f 6e 20 6f 66 20 63 68 |definiti|on of ch|
|00000680| 61 72 61 63 74 65 72 20 | 54 4f 43 48 41 52 20 69 |aracter |TOCHAR i|
|00000690| 6e 20 66 75 6e 63 74 69 | 6f 6e 2d 6b 65 79 6d 61 |n functi|on-keyma|
|000006a0| 70 2e 0a 5c 22 46 6f 72 | 77 61 72 64 69 6e 67 5c |p..\"For|warding\|
|000006b0| 22 20 6d 65 61 6e 73 20 | 74 68 61 74 20 73 75 62 |" means |that sub|
|000006c0| 73 65 71 75 65 6e 74 20 | 72 65 64 65 66 69 6e 69 |sequent |redefini|
|000006d0| 74 69 6f 6e 20 6f 66 20 | 54 4f 43 48 41 52 20 69 |tion of |TOCHAR i|
|000006e0| 6e 0a 66 75 6e 63 74 69 | 6f 6e 2d 6b 65 79 6d 61 |n.functi|on-keyma|
|000006f0| 70 20 77 69 6c 6c 20 62 | 65 20 73 65 65 6e 20 61 |p will b|e seen a|
|00000700| 75 74 6f 6d 61 74 69 63 | 61 6c 6c 79 20 69 6e 20 |utomatic|ally in |
|00000710| 4d 41 50 20 61 73 20 77 | 65 6c 6c 2e 0a 0a 54 68 |MAP as w|ell...Th|
|00000720| 69 73 20 66 75 6e 63 74 | 69 6f 6e 20 69 73 20 75 |is funct|ion is u|
|00000730| 73 65 64 20 62 79 20 66 | 69 6c 65 73 20 74 65 72 |sed by f|iles ter|
|00000740| 6d 2f 2a 2e 65 6c 20 74 | 6f 20 73 65 74 20 75 70 |m/*.el t|o set up|
|00000750| 20 74 68 65 20 6d 61 70 | 70 69 6e 67 20 66 72 6f | the map|ping fro|
|00000760| 6d 20 74 68 65 0a 65 73 | 63 61 70 65 20 73 65 71 |m the.es|cape seq|
|00000770| 75 65 6e 63 65 73 20 73 | 65 6e 74 20 62 79 20 66 |uences s|ent by f|
|00000780| 75 6e 63 74 69 6f 6e 20 | 6b 65 79 73 20 6f 6e 20 |unction |keys on |
|00000790| 70 61 72 74 69 63 75 6c | 61 72 20 74 65 72 6d 69 |particul|ar termi|
|000007a0| 6e 61 6c 73 20 28 46 52 | 4f 4d 53 54 52 49 4e 47 |nals (FR|OMSTRING|
|000007b0| 73 29 0a 69 6e 74 6f 20 | 45 6d 61 63 73 20 73 74 |s).into |Emacs st|
|000007c0| 61 6e 64 61 72 64 20 66 | 75 6e 63 74 69 6f 6e 20 |andard f|unction |
|000007d0| 6b 65 79 20 73 6c 6f 74 | 73 20 28 54 4f 43 48 41 |key slot|s (TOCHA|
|000007e0| 52 73 29 2e 0a 41 6e 20 | 61 63 74 75 61 6c 20 64 |Rs)..An |actual d|
|000007f0| 65 66 69 6e 69 74 69 6f | 6e 20 28 73 75 63 68 20 |efinitio|n (such |
|00000800| 61 73 20 61 20 73 79 6d | 62 6f 6c 29 20 6d 61 79 |as a sym|bol) may|
|00000810| 20 62 65 20 67 69 76 65 | 6e 20 69 6e 20 70 6c 61 | be give|n in pla|
|00000820| 63 65 20 6f 66 20 54 4f | 43 48 41 52 2e 0a 47 65 |ce of TO|CHAR..Ge|
|00000830| 6e 65 72 61 6c 6c 79 2c | 20 4d 41 50 20 69 73 20 |nerally,| MAP is |
|00000840| 61 20 70 72 65 66 69 78 | 20 6b 65 79 6d 61 70 20 |a prefix| keymap |
|00000850| 77 68 69 63 68 20 77 69 | 6c 6c 20 62 65 20 61 74 |which wi|ll be at|
|00000860| 74 61 63 68 65 64 20 74 | 6f 20 61 20 6b 65 79 0a |tached t|o a key.|
|00000870| 74 68 61 74 20 69 73 20 | 74 68 65 20 63 6f 6d 6d |that is |the comm|
|00000880| 6f 6e 20 70 72 65 66 69 | 78 20 73 65 6e 74 20 62 |on prefi|x sent b|
|00000890| 79 20 61 6c 6c 20 66 75 | 6e 63 74 69 6f 6e 20 6b |y all fu|nction k|
|000008a0| 65 79 73 20 28 6f 66 74 | 65 6e 20 45 53 43 20 4f |eys (oft|en ESC O|
|000008b0| 20 6f 72 20 45 53 43 20 | 5b 29 2e 22 20 28 62 79 | or ESC |[)." (by|
|000008c0| 74 65 2d 63 6f 64 65 20 | 22 08 85 26 00 c3 09 08 |te-code |"..&....|
|000008d0| 40 40 c4 08 40 41 21 83 | 19 00 0a 08 40 41 42 82 |@@..@A!.|....@AB.|
|000008e0| 1c 00 08 40 41 23 88 08 | 41 89 10 88 82 00 00 87 |...@A#..|A.......|
|000008f0| 22 20 5b 74 72 61 6e 73 | 6c 61 74 69 6f 6e 73 20 |" [trans|lations |
|00000900| 6d 61 70 20 66 75 6e 63 | 74 69 6f 6e 2d 6b 65 79 |map func|tion-key|
|00000910| 6d 61 70 20 64 65 66 69 | 6e 65 2d 6b 65 79 20 6e |map defi|ne-key n|
|00000920| 75 6d 62 65 72 70 5d 20 | 37 29 29 0a 0a 28 64 65 |umberp] |7))..(de|
|00000930| 66 75 6e 20 66 75 6e 63 | 74 69 6f 6e 2d 6b 65 79 |fun func|tion-key|
|00000940| 2d 73 65 71 75 65 6e 63 | 65 20 28 63 68 61 72 29 |-sequenc|e (char)|
|00000950| 20 22 5c 0a 52 65 74 75 | 72 6e 20 6b 65 79 20 73 | "\.Retu|rn key s|
|00000960| 65 71 75 65 6e 63 65 20 | 66 6f 72 20 66 75 6e 63 |equence |for func|
|00000970| 74 69 6f 6e 20 6b 65 79 | 20 74 68 61 74 20 6f 6e |tion key| that on|
|00000980| 20 74 68 69 73 20 74 65 | 72 6d 69 6e 61 6c 0a 74 | this te|rminal.t|
|00000990| 72 61 6e 73 6c 61 74 65 | 73 20 69 6e 74 6f 20 73 |ranslate|s into s|
|000009a0| 6c 6f 74 20 43 48 41 52 | 20 69 6e 20 66 75 6e 63 |lot CHAR| in func|
|000009b0| 74 69 6f 6e 2d 6b 65 79 | 6d 61 70 2e 0a 4f 72 20 |tion-key|map..Or |
|000009c0| 72 65 74 75 72 6e 20 6e | 69 6c 20 69 66 20 74 68 |return n|il if th|
|000009d0| 65 72 65 20 69 73 20 6e | 6f 6e 65 2e 22 20 28 62 |ere is n|one." (b|
|000009e0| 79 74 65 2d 63 6f 64 65 | 20 22 c2 08 09 42 c3 20 |yte-code| "...B. |
|000009f0| 5c 22 40 87 22 20 5b 66 | 75 6e 63 74 69 6f 6e 2d |\"@." [f|unction-|
|00000a00| 6b 65 79 6d 61 70 20 63 | 68 61 72 20 77 68 65 72 |keymap c|har wher|
|00000a10| 65 2d 69 73 2d 69 6e 74 | 65 72 6e 61 6c 20 63 75 |e-is-int|ernal cu|
|00000a20| 72 72 65 6e 74 2d 6c 6f | 63 61 6c 2d 6d 61 70 5d |rrent-lo|cal-map]|
|00000a30| 20 34 29 29 0a 0a 28 70 | 72 6f 76 69 64 65 20 28 | 4))..(p|rovide (|
|00000a40| 71 75 6f 74 65 20 6b 65 | 79 70 61 64 29 29 0a |quote ke|ypad)). |
+--------+-------------------------+-------------------------+--------+--------+