mode-defs.sl 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510
  1. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  2. %
  3. % MODE-DEFS.SL - NMODE Command Table and Mode Definitions
  4. %
  5. % Author: Alan Snyder
  6. % Hewlett-Packard/CRC
  7. % Date: 14 September 1982
  8. % Revised: 18 February 1983
  9. %
  10. % 18-Feb-83 Alan Snyder
  11. % Rename down-list and insert-parens. Add M-) command.
  12. % 9-Feb-83 Alan Snyder
  13. % Add Esc-_ (Help), temporarily attached to M-X Apropos.
  14. % Move some M-X commands into text-command-list.
  15. % 2-Feb-83 Alan Snyder
  16. % Add Lisp-D.
  17. % 26-Jan-83 Alan Snyder
  18. % Add Esc-/.
  19. % 25-Jan-83 Alan Snyder
  20. % Created Window-Command-List to allow scrolling in Recurse mode.
  21. % Removed modifying text commands from Recurse mode.
  22. % 24-Jan-83 Jeffrey Soreff
  23. % Added definition of Recurse-Mode
  24. % Defined M-X commands: Delete Matching Lines, Flush Lines,
  25. % Delete Non-Matching Lines, Keep Lines, How Many, Count Occurrences,
  26. % Set Key, Set Visited Filename, Rename Buffer, Kill Some Buffers,
  27. % Insert Date, Revert File
  28. % 5-Jan-83 Alan Snyder
  29. % Revised definition of input mode, C-S, and C-R.
  30. % 3-Dec-82 Alan Snyder
  31. % New definitions for ) and ] in Lisp mode.
  32. % New definitions for C-M-(, C-M-), C-M-U, C-M-N, and C-M-P.
  33. % New definitions for C-M-A, C-M-[, and C-M-R.
  34. % Define C-M-\ (Indent Region) in Lisp mode and Text mode.
  35. % Define C-? same as M-?, C-( same as C-M-(, C-) same as C-M-).
  36. % Lisp Mode establishes Lisp Parser.
  37. % Define C-M-C.
  38. % Define the text commands: C-=, C-X =, M-A, M-E, M-K, C-X Rubout, M-Z, M-Q,
  39. % M-G, M-H, M-], M-[, M-S.
  40. % Fix definitions of digits and hyphen: inserting definition goes on
  41. % text-command-list (where insertion commands go).
  42. %
  43. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  44. % (CompileTime (load objects))
  45. (CompileTime (load extended-char))
  46. % External variables:
  47. (fluid '(nmode-default-mode
  48. nmode-current-buffer
  49. nmode-input-special-command-list
  50. ))
  51. % Mode definitions:
  52. (fluid '(Lisp-Interface-Mode
  53. Text-Mode
  54. Basic-Mode
  55. Read-Only-Text-Mode
  56. Input-Mode
  57. Recurse-Mode
  58. ))
  59. % Command lists:
  60. (fluid '(Input-Command-List
  61. Read-Only-Text-Command-List
  62. Text-Command-List
  63. Rlisp-Command-List
  64. Lisp-Command-List
  65. Read-Only-Terminal-Command-List
  66. Modifying-Terminal-Command-List
  67. Window-Command-List
  68. Basic-Command-List
  69. Essential-Command-List
  70. Recurse-Command-List
  71. ))
  72. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  73. %
  74. % Mode Definitions
  75. %
  76. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  77. (de nmode-initialize-modes ()
  78. (setf Basic-Mode
  79. (nmode-define-mode
  80. "Basic"
  81. '((nmode-define-commands Basic-Command-List)
  82. (nmode-define-commands Read-Only-Terminal-Command-List)
  83. (nmode-define-commands Window-Command-List)
  84. (nmode-define-commands Essential-Command-List)
  85. )))
  86. (setf Read-Only-Text-Mode
  87. (nmode-define-mode
  88. "Read-Only-Text"
  89. '((nmode-define-commands Read-Only-Text-Command-List)
  90. (nmode-establish-mode Basic-Mode)
  91. )))
  92. (setf Text-Mode
  93. (nmode-define-mode
  94. "Text"
  95. '((nmode-define-commands Text-Command-List)
  96. (nmode-define-commands Modifying-Terminal-Command-List)
  97. (nmode-establish-mode Read-Only-Text-Mode)
  98. (nmode-define-normal-self-inserts)
  99. )))
  100. (setf Lisp-Interface-Mode
  101. (nmode-define-mode
  102. "Lisp"
  103. '((nmode-define-commands Rlisp-Command-List)
  104. (establish-lisp-parser)
  105. (nmode-define-commands Lisp-Command-List)
  106. (nmode-establish-mode Text-Mode)
  107. )))
  108. (setf Input-Mode
  109. (nmode-define-mode
  110. "Input"
  111. '((nmode-define-commands nmode-input-special-command-list)
  112. (nmode-define-command (x-char CR) 'nmode-terminate-input)
  113. (nmode-define-command (x-char LF) 'nmode-terminate-input)
  114. (nmode-define-commands Input-Command-List)
  115. (nmode-define-commands Text-Command-List)
  116. (nmode-define-commands Read-Only-Text-Command-List)
  117. (nmode-define-commands Read-Only-Terminal-Command-List)
  118. (nmode-define-commands Essential-Command-List)
  119. (nmode-define-normal-self-inserts)
  120. )))
  121. (setf Recurse-Mode
  122. (nmode-define-mode
  123. "Recurse"
  124. '((nmode-define-commands Read-Only-Text-Command-List)
  125. (nmode-define-commands Read-Only-Terminal-Command-List)
  126. (nmode-define-commands Window-Command-List)
  127. (nmode-define-commands Essential-Command-List)
  128. (nmode-define-commands Recurse-Command-List)
  129. )))
  130. (setf nmode-default-mode Text-Mode)
  131. % Define initial set of file modes.
  132. (nmode-declare-file-mode "txt" Text-Mode)
  133. (nmode-declare-file-mode "red" Lisp-Interface-Mode)
  134. (nmode-declare-file-mode "sl" Lisp-Interface-Mode)
  135. (nmode-declare-file-mode "lsp" Lisp-Interface-Mode)
  136. (nmode-declare-file-mode "lap" Lisp-Interface-Mode)
  137. (nmode-declare-file-mode "build" Lisp-Interface-Mode)
  138. )
  139. (de lisp-mode-command ()
  140. (buffer-set-mode nmode-current-buffer Lisp-Interface-Mode)
  141. )
  142. (de text-mode-command ()
  143. (buffer-set-mode nmode-current-buffer Text-Mode)
  144. )
  145. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  146. % Command Lists:
  147. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  148. % Rlisp-Command-List - commands related to the LISP interface
  149. (setf Rlisp-Command-List
  150. (list
  151. (cons (x-char C-!]) 'Lisp-prefix)
  152. (cons (x-chars C-!] !?) 'lisp-help-command)
  153. (cons (x-chars C-!] A) 'lisp-abort-command)
  154. (cons (x-chars C-!] B) 'lisp-backtrace-command)
  155. (cons (x-chars C-!] C) 'lisp-continue-command)
  156. (cons (x-chars C-!] D) 'execute-defun-command)
  157. (cons (x-chars C-!] E) 'execute-form-command)
  158. (cons (x-chars C-!] L) 'exit-nmode)
  159. (cons (x-chars C-!] Q) 'lisp-quit-command)
  160. (cons (x-chars C-!] R) 'lisp-retry-command)
  161. (cons (x-chars C-!] Y) 'yank-last-output-command)
  162. ))
  163. % Lisp-Command-List - commands related to editing LISP text
  164. (setf Lisp-Command-List
  165. (list
  166. (cons (x-char !)) 'insert-closing-bracket)
  167. (cons (x-char !]) 'insert-closing-bracket)
  168. (cons (x-char C-!() 'backward-up-list-command)
  169. (cons (x-char C-!)) 'forward-up-list-command)
  170. (cons (x-char C-M-!() 'backward-up-list-command)
  171. (cons (x-char C-M-!)) 'forward-up-list-command)
  172. (cons (x-char C-M-![) 'move-backward-defun-command)
  173. (cons (x-char C-M-!]) 'end-of-defun-command)
  174. (cons (x-char C-M-!\) 'lisp-indent-region-command)
  175. (cons (x-char C-M-@) 'mark-form-command)
  176. (cons (x-char C-M-A) 'move-backward-defun-command)
  177. (cons (x-char C-M-B) 'move-backward-form-command)
  178. (cons (x-char C-M-BACKSPACE) 'mark-defun-command)
  179. (cons (x-char C-M-D) 'down-list-command)
  180. (cons (x-char C-M-E) 'end-of-defun-command)
  181. (cons (x-char C-M-F) 'move-forward-form-command)
  182. (cons (x-char C-M-H) 'mark-defun-command)
  183. (cons (x-char C-M-I) 'lisp-tab-command)
  184. (cons (x-char C-M-K) 'kill-forward-form-command)
  185. (cons (x-char C-M-N) 'move-forward-list-command)
  186. (cons (x-char C-M-P) 'move-backward-list-command)
  187. (cons (x-char C-M-Q) 'lisp-indent-sexpr)
  188. (cons (x-char C-M-R) 'reposition-window-command)
  189. (cons (x-char C-M-RUBOUT) 'kill-backward-form-command)
  190. (cons (x-char C-M-T) 'transpose-forms)
  191. (cons (x-char C-M-TAB) 'lisp-tab-command)
  192. (cons (x-char C-M-U) 'backward-up-list-command)
  193. (cons (x-char M-!;) 'insert-comment-command)
  194. (cons (x-char M-BACKSPACE) 'mark-defun-command)
  195. (cons (x-char M-!() 'make-parens-command)
  196. (cons (x-char M-!)) 'move-over-paren-command)
  197. (cons (x-char RUBOUT) 'delete-backward-hacking-tabs-command)
  198. (cons (x-char TAB) 'lisp-tab-command)
  199. ))
  200. % Essential-Command-List: the most essential commands
  201. (setf Essential-Command-List
  202. (list
  203. (cons (x-char C-X) 'c-x-prefix)
  204. (cons (x-char ESC) 'Esc-prefix)
  205. (cons (x-char M-X) 'm-x-prefix)
  206. (cons (x-char C-M-X) 'm-x-prefix)
  207. (cons (x-char C-G) 'nmode-abort-command)
  208. (cons (x-char C-L) 'nmode-refresh-command)
  209. (cons (x-char C-U) 'universal-argument)
  210. (cons (x-char 0) 'argument-digit)
  211. (cons (x-char 1) 'argument-digit)
  212. (cons (x-char 2) 'argument-digit)
  213. (cons (x-char 3) 'argument-digit)
  214. (cons (x-char 4) 'argument-digit)
  215. (cons (x-char 5) 'argument-digit)
  216. (cons (x-char 6) 'argument-digit)
  217. (cons (x-char 7) 'argument-digit)
  218. (cons (x-char 8) 'argument-digit)
  219. (cons (x-char 9) 'argument-digit)
  220. (cons (x-char -) 'negative-argument)
  221. (cons (x-char C-0) 'argument-digit)
  222. (cons (x-char C-1) 'argument-digit)
  223. (cons (x-char C-2) 'argument-digit)
  224. (cons (x-char C-3) 'argument-digit)
  225. (cons (x-char C-4) 'argument-digit)
  226. (cons (x-char C-5) 'argument-digit)
  227. (cons (x-char C-6) 'argument-digit)
  228. (cons (x-char C-7) 'argument-digit)
  229. (cons (x-char C-8) 'argument-digit)
  230. (cons (x-char C-9) 'argument-digit)
  231. (cons (x-char C--) 'negative-argument)
  232. (cons (x-char M-0) 'argument-digit)
  233. (cons (x-char M-1) 'argument-digit)
  234. (cons (x-char M-2) 'argument-digit)
  235. (cons (x-char M-3) 'argument-digit)
  236. (cons (x-char M-4) 'argument-digit)
  237. (cons (x-char M-5) 'argument-digit)
  238. (cons (x-char M-6) 'argument-digit)
  239. (cons (x-char M-7) 'argument-digit)
  240. (cons (x-char M-8) 'argument-digit)
  241. (cons (x-char M-9) 'argument-digit)
  242. (cons (x-char M--) 'negative-argument)
  243. (cons (x-char C-M-0) 'argument-digit)
  244. (cons (x-char C-M-1) 'argument-digit)
  245. (cons (x-char C-M-2) 'argument-digit)
  246. (cons (x-char C-M-3) 'argument-digit)
  247. (cons (x-char C-M-4) 'argument-digit)
  248. (cons (x-char C-M-5) 'argument-digit)
  249. (cons (x-char C-M-6) 'argument-digit)
  250. (cons (x-char C-M-7) 'argument-digit)
  251. (cons (x-char C-M-8) 'argument-digit)
  252. (cons (x-char C-M-9) 'argument-digit)
  253. (cons (x-char C-M--) 'negative-argument)
  254. (cons (x-chars C-X C-Z) 'nmode-exit-to-superior)
  255. (cons (x-chars C-X V) 'nmode-invert-video)
  256. (cons (x-chars Esc !/) 'execute-softkey-command)
  257. ))
  258. % Window-Command-List: commands for scrolling, etc.
  259. % These commands do not allow selecting a new window, buffer, mode, etc.
  260. (setf Window-Command-List
  261. (list
  262. (cons (x-char C-M-V) 'scroll-other-window-command)
  263. (cons (x-char C-V) 'next-screen-command)
  264. (cons (x-char M-R) 'move-to-screen-edge-command)
  265. (cons (x-char M-V) 'previous-screen-command)
  266. (cons (x-chars C-X <) 'scroll-window-left-command)
  267. (cons (x-chars C-X >) 'scroll-window-right-command)
  268. (cons (x-chars C-X P) 'write-screen-photo-command)
  269. (cons (x-chars C-X ^) 'grow-window-command)
  270. ))
  271. % Basic-Command-List: contains commands desirable in almost any mode.
  272. (setf Basic-Command-List
  273. (list
  274. (cons (x-char C-!?) 'help-dispatch)
  275. (cons (x-char C-M-L) 'select-previous-buffer-command)
  276. (cons (x-char M-!/) 'help-dispatch)
  277. (cons (x-char M-!?) 'help-dispatch)
  278. (cons (x-char M-!~) 'buffer-not-modified-command)
  279. (cons (x-chars C-X !.) 'set-fill-prefix-command)
  280. (cons (x-chars C-X 1) 'one-window-command)
  281. (cons (x-chars C-X 2) 'two-windows-command)
  282. (cons (x-chars C-X 3) 'view-two-windows-command)
  283. (cons (x-chars C-X 4) 'visit-in-other-window-command)
  284. (cons (x-chars C-X B) 'select-buffer-command)
  285. (cons (x-chars C-X C-B) 'buffer-browser-command)
  286. (cons (x-chars C-X C-F) 'find-file-command)
  287. (cons (x-chars C-X C-S) 'save-file-command)
  288. (cons (x-chars C-X C-W) 'write-file-command) % here???
  289. (cons (x-chars C-X D) 'dired-command)
  290. (cons (x-chars C-X E) 'exchange-windows-command)
  291. (cons (x-chars C-X F) 'set-fill-column-command)
  292. (cons (x-chars C-X K) 'kill-buffer-command)
  293. (cons (x-chars C-X O) 'other-window-command)
  294. (cons (x-chars Esc _) 'apropos-command)
  295. (cons (m-x "Append to File") 'append-to-file-command)
  296. (cons (m-x "Apropos") 'apropos-command)
  297. (cons (m-x "Auto Fill Mode") 'auto-fill-mode-command)
  298. (cons (m-x "Count Occurrences") 'Count-Occurrences-command)
  299. (cons (m-x "Delete and Expunge File") 'delete-and-expunge-file-command)
  300. (cons (m-x "Delete File") 'delete-file-command)
  301. (cons (m-x "DIRED") 'edit-directory-command)
  302. (cons (m-x "Edit Directory") 'edit-directory-command)
  303. (cons (m-x "Execute Buffer") 'execute-buffer-command)
  304. (cons (m-x "Execute File") 'execute-file-command)
  305. (cons (m-x "Find File") 'find-file-command)
  306. (cons (m-x "How Many") 'Count-Occurrences-command)
  307. (cons (m-x "Kill Buffer") 'kill-buffer-command)
  308. (cons (m-x "Kill File") 'delete-file-command)
  309. (cons (m-x "Kill Some Buffers") 'kill-some-buffers-command)
  310. (cons (m-x "List Buffers") 'buffer-browser-command)
  311. (cons (m-x "Make Space") 'nmode-gc)
  312. (cons (m-x "Prepend to File") 'prepend-to-file-command)
  313. (cons (m-x "Rename Buffer") 'rename-buffer-command)
  314. (cons (m-x "Save All Files") 'save-all-files-command)
  315. (cons (m-x "Select Buffer") 'select-buffer-command)
  316. (cons (m-x "Set Key") 'set-key-command)
  317. (cons (m-x "Set Visited Filename") 'set-visited-filename-command)
  318. (cons (m-x "Start Scripting") 'start-scripting-command)
  319. (cons (m-x "Start Timing NMODE") 'start-timing-command)
  320. (cons (m-x "Stop Scripting") 'stop-scripting-command)
  321. (cons (m-x "Stop Timing NMODE") 'stop-timing-command)
  322. (cons (m-x "Undelete File") 'undelete-file-command)
  323. (cons (m-x "Write File") 'write-file-command) % here???
  324. (cons (m-x "Write Region") 'write-region-command)
  325. ))
  326. % Read-Only-Text-Command-List: Commands for editing text buffers that
  327. % do not modify the buffer.
  328. (setf Read-Only-Text-Command-List
  329. (list
  330. % These commands are read-only commands for text mode.
  331. (cons (x-char BACKSPACE) 'move-backward-character-command)
  332. (cons (x-char C-<) 'mark-beginning-command)
  333. (cons (x-char C->) 'mark-end-command)
  334. (cons (x-char C-=) 'what-cursor-position-command)
  335. (cons (x-char C-@) 'set-mark-command)
  336. (cons (x-char C-A) 'move-to-start-of-line-command)
  337. (cons (x-char C-B) 'move-backward-character-command)
  338. (cons (x-char C-E) 'move-to-end-of-line-command)
  339. (cons (x-char C-F) 'move-forward-character-command)
  340. (cons (x-char C-M-M) 'back-to-indentation-command)
  341. (cons (x-char C-M-RETURN) 'back-to-indentation-command)
  342. (cons (x-char C-M-W) 'append-next-kill-command)
  343. (cons (x-char C-N) 'move-down-command)
  344. (cons (x-char C-P) 'move-up-command)
  345. (cons (x-char C-R) 'reverse-search-command)
  346. (cons (x-char C-S) 'incremental-search-command)
  347. (cons (x-char C-SPACE) 'set-mark-command)
  348. (cons (x-char M-<) 'move-to-buffer-start-command)
  349. (cons (x-char M->) 'move-to-buffer-end-command)
  350. (cons (x-char M-![) 'backward-paragraph-command)
  351. (cons (x-char M-!]) 'forward-paragraph-command)
  352. (cons (x-char M-@) 'mark-word-command)
  353. (cons (x-char M-A) 'backward-sentence-command)
  354. (cons (x-char M-B) 'move-backward-word-command)
  355. (cons (x-char M-E) 'forward-sentence-command)
  356. (cons (x-char M-F) 'move-forward-word-command)
  357. (cons (x-char M-H) 'mark-paragraph-command)
  358. (cons (x-char M-M) 'back-to-indentation-command)
  359. (cons (x-char M-RETURN) 'back-to-indentation-command)
  360. (cons (x-char M-W) 'copy-region)
  361. (cons (x-chars C-X A) 'append-to-buffer-command)
  362. (cons (x-chars C-X C-N) 'set-goal-column-command)
  363. (cons (x-chars C-X C-X) 'exchange-point-and-mark)
  364. (cons (x-chars C-X H) 'mark-whole-buffer-command)
  365. (cons (x-chars C-X =) 'what-cursor-position-command)
  366. ))
  367. % Text-Command-List: Commands for editing text buffers that might modify
  368. % the buffer. Note: put read-only commands on
  369. % Read-Only-Text-Command-List (above).
  370. (setf Text-Command-List
  371. (list
  372. (cons (x-char 0) 'argument-or-insert-command)
  373. (cons (x-char 1) 'argument-or-insert-command)
  374. (cons (x-char 2) 'argument-or-insert-command)
  375. (cons (x-char 3) 'argument-or-insert-command)
  376. (cons (x-char 4) 'argument-or-insert-command)
  377. (cons (x-char 5) 'argument-or-insert-command)
  378. (cons (x-char 6) 'argument-or-insert-command)
  379. (cons (x-char 7) 'argument-or-insert-command)
  380. (cons (x-char 8) 'argument-or-insert-command)
  381. (cons (x-char 9) 'argument-or-insert-command)
  382. (cons (x-char -) 'argument-or-insert-command)
  383. (cons (x-char C-!%) 'replace-string-command)
  384. (cons (x-char C-D) 'delete-forward-character-command)
  385. (cons (x-char C-K) 'kill-line)
  386. (cons (x-char C-M-C) 'insert-self-command)
  387. (cons (x-char C-M-O) 'split-line-command)
  388. (cons (x-char C-M-!\) 'indent-region-command)
  389. (cons (x-char C-N) 'move-down-extending-command)
  390. (cons (x-char C-O) 'open-line-command)
  391. (cons (x-char C-Q) 'insert-next-character-command)
  392. (cons (x-char C-RUBOUT) 'delete-backward-hacking-tabs-command)
  393. (cons (x-char C-T) 'transpose-characters-command)
  394. (cons (x-char C-W) 'kill-region)
  395. (cons (x-char C-Y) 'insert-kill-buffer)
  396. (cons (x-char LF) 'indent-new-line-command)
  397. (cons (x-char M-!') 'upcase-digit-command)
  398. (cons (x-char M-!%) 'query-replace-command)
  399. (cons (x-char M-!\) 'delete-horizontal-space-command)
  400. (cons (x-char M-C) 'uppercase-initial-command)
  401. (cons (x-char M-D) 'kill-forward-word-command)
  402. (cons (x-char M-G) 'fill-region-command)
  403. (cons (x-char M-I) 'tab-to-tab-stop-command)
  404. (cons (x-char M-K) 'kill-sentence-command)
  405. (cons (x-char M-L) 'lowercase-word-command)
  406. (cons (x-char M-Q) 'fill-paragraph-command)
  407. (cons (x-char M-RUBOUT) 'kill-backward-word-command)
  408. (cons (x-char M-S) 'center-line-command)
  409. (cons (x-char M-T) 'transpose-words)
  410. (cons (x-char M-TAB) 'tab-to-tab-stop-command)
  411. (cons (x-char M-U) 'uppercase-word-command)
  412. (cons (x-char M-Y) 'unkill-previous)
  413. (cons (x-char M-Z) 'fill-comment-command)
  414. (cons (x-char M-^) 'delete-indentation-command)
  415. (cons (x-char RETURN) 'return-command)
  416. (cons (x-char RUBOUT) 'delete-backward-character-command)
  417. (cons (x-char TAB) 'tab-to-tab-stop-command)
  418. (cons (x-chars C-X C-L) 'lowercase-region-command)
  419. (cons (x-chars C-X C-O) 'delete-blank-lines-command)
  420. (cons (x-chars C-X C-T) 'transpose-lines)
  421. (cons (x-chars C-X C-U) 'uppercase-region-command)
  422. (cons (x-chars C-X C-V) 'visit-file-command)
  423. (cons (x-chars C-X G) 'get-register-command)
  424. (cons (x-chars C-X Rubout) 'backward-kill-sentence-command)
  425. (cons (x-chars C-X T) 'transpose-regions)
  426. (cons (x-chars C-X X) 'put-register-command)
  427. (cons (m-x "Delete Matching Lines") 'delete-matching-lines-command)
  428. (cons (m-x "Delete Non-Matching Lines") 'delete-non-matching-lines-command)
  429. (cons (m-x "Flush Lines") 'delete-matching-lines-command)
  430. (cons (m-x "Insert Buffer") 'insert-buffer-command)
  431. (cons (m-x "Insert Date") 'insert-date-command)
  432. (cons (m-x "Insert File") 'insert-file-command)
  433. (cons (m-x "Keep Lines") 'delete-non-matching-lines-command)
  434. (cons (m-x "Lisp Mode") 'lisp-mode-command)
  435. (cons (m-x "Replace String") 'replace-string-command)
  436. (cons (m-x "Query Replace") 'query-replace-command)
  437. (cons (m-x "Revert File") 'revert-file-command)
  438. (cons (m-x "Text Mode") 'text-mode-command)
  439. (cons (m-x "Visit File") 'visit-file-command)
  440. ))
  441. (setf Read-Only-Terminal-Command-List
  442. (list
  443. (cons (x-chars ESC !h) 'move-to-buffer-start-command)
  444. (cons (x-chars ESC 4) 'move-backward-word-command)
  445. (cons (x-chars ESC 5) 'move-forward-word-command)
  446. (cons (x-chars ESC A) 'move-up-command)
  447. (cons (x-chars ESC B) 'move-down-command)
  448. (cons (x-chars ESC C) 'move-forward-character-command)
  449. (cons (x-chars ESC D) 'move-backward-character-command)
  450. (cons (x-chars ESC F) 'move-to-buffer-end-command)
  451. (cons (x-chars ESC J) 'nmode-full-refresh)
  452. (cons (x-chars ESC S) 'scroll-window-up-line-command)
  453. (cons (x-chars ESC T) 'scroll-window-down-line-command)
  454. (cons (x-chars ESC U) 'scroll-window-up-page-command)
  455. (cons (x-chars ESC V) 'scroll-window-down-page-command)
  456. ))
  457. (setf Modifying-Terminal-Command-List
  458. (list
  459. (cons (x-chars ESC L) 'open-line-command)
  460. (cons (x-chars ESC M) 'kill-line)
  461. (cons (x-chars ESC P) 'delete-forward-character-command)
  462. ))
  463. (setf Input-Command-List
  464. (list
  465. (cons (x-char C-R) 'nmode-yank-default-input)
  466. ))
  467. (setf Recurse-Command-List
  468. (list
  469. (cons (x-char y) 'affirmative-exit)
  470. (cons (x-char n) 'negative-exit)
  471. ))