home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Source Code 1993 July / THE_SOURCE_CODE_CD_ROM.iso / languages / elisp / modes / edt / edt-user.el-1 < prev    next >
Encoding:
Text File  |  1991-10-25  |  8.4 KB  |  189 lines

  1. ;;; File:  edt-user.el-1, v 1.4
  2. ;;;
  3. ;;; BEFORE USING THIS FILE, rename it to edt-user.el.
  4. ;;;
  5. ;;; See edt-user.doc for general customization instructions BEFORE using
  6. ;;; and/or changing the contents of this file!
  7. ;;; 
  8. ;;;                  -------   ---------------------------
  9. ;;;                  U s e r   C u s t o m i z a t i o n s
  10. ;;;                  -------   ---------------------------
  11. ;;;
  12. ;;;            -----   -----------   -------   -----------------
  13. ;;;            E D T   K e y p a d   M o d e   E m u l a t i o n
  14. ;;;            -----   -----------   -------   -----------------
  15. ;;;
  16. ;;;                        BETA Distribution Version 0.5
  17. ;;;
  18. ;;; Copyright (C) 1986 Free Software Foundation, Inc.
  19. ;;; Copyright (C) 1991 Kevin Gallagher
  20. ;;;
  21. ;;;
  22. ;;; This file contains GNU Emacs User Custom EDT bindings and functions.  In
  23. ;;; this example file, there is no special test for the type of terminal being
  24. ;;; used.  The assumption is that all key bindings here apply to all terminals
  25. ;;; that may be used.  (In fact, it was written by an individual who uses only
  26. ;;; VT series terminals when logging into a VAX.)  If you plan to use two or
  27. ;;; more very different types of terminals, each requiring very different
  28. ;;; special handling, then you should model your edt-user.el file after the
  29. ;;; other sample file:  edt-user.el-2.
  30. ;;;
  31. ;;; WARNING: Each of the three functions, edt-bind-function-key,
  32. ;;;          edt-bind-gold-key, and edt-bind-standard-key, has an optional
  33. ;;;          last argument.  The optional argument should NOT be used in
  34. ;;;          edt-user.el!  When the optional argument is missing, each
  35. ;;;          function knows to make the key binding part of the user's EDT
  36. ;;;          custom bindings, which is what you want to do in edt-user.el!
  37. ;;;
  38. ;;;          The EDT default bindings are set up in edt.el by calling these
  39. ;;;          same functions with the optional last argument set to "t".  So,
  40. ;;;          if you decide to copy such function calls from edt.el to
  41. ;;;          edt-user.el, BE SURE TO DELETE THE "t" AT THE END OF EACH
  42. ;;;          PARAMETER LIST!
  43. ;;;
  44. ;;; Send bug reports and suggestions for improvement to Kevin Gallagher
  45. ;;; (kgallagh@digi.lonestar.org).
  46. ;;;
  47.  
  48.  
  49. ;;;;
  50. ;;;; Setup user custom EDT key bindings.
  51. ;;;;
  52.  
  53. (defun edt-setup-user-bindings ()
  54.   "Assigns user custom EDT Emulation keyboard bindings."
  55.  
  56.   ;; PF1 (GOLD), PF2, PF3, PF4
  57.   ;;
  58.   ;; This file MUST contain a binding of PF1 to edt-user-gold-map.  So
  59.   ;; DON'T CHANGE OR DELETE THE REGULAR KEY BINDING OF PF1 BELOW!
  60.   ;; (However, you may change the GOLD-PF1 binding, if you wish.)
  61.   (edt-bind-function-key "PF1" 'edt-user-gold-map 'edt-mark-section-wisely)
  62.   (edt-bind-function-key "PF2" 'query-replace 'other-window)
  63.   (edt-bind-function-key "PF4" 'edt-delete-entire-line 'edt-undelete-line)
  64.  
  65.   ;; EDT Keypad Keys
  66.   (edt-bind-function-key "KP1" 'edt-word-forward 'edt-change-case)
  67.   (edt-bind-function-key "KP3" 'edt-word-backward 'edt-copy)
  68.   (edt-bind-function-key "KP6" 'edt-cut-or-copy 'yank)
  69.   (edt-bind-function-key "KP8" 'edt-scroll-window 'fill-paragraph)
  70.   (edt-bind-function-key "KP9" 'open-line 'edt-eliminate-all-tabs)
  71.   (edt-bind-function-key "KPP" 
  72.              'edt-toggle-select 'edt-line-to-middle-of-window)
  73.   (edt-bind-function-key "KPE" 'edt-change-direction 'overwrite-mode)
  74.  
  75.   ;; EDT Function Keys 
  76.   ;; 
  77.   ;; If you wish to retain the feature of emulating an ESC key with F11 on a
  78.   ;; terminal that has no ESC key, this file MUST contain a binding of F11 to
  79.   ;; edt-user-ESC-prefix.  So DON'T CHANGE OR DELETE THE REGULAR KEY BINDING
  80.   ;; OF F11 BELOW!  (However, you may change the GOLD-F11 binding, if you
  81.   ;; wish.)
  82.   (edt-bind-function-key "F11" 'edt-user-ESC-prefix 'edt-key-not-assigned) ;ESC
  83.  
  84.   ;; GOLD bindings for regular keys.
  85.   (edt-bind-gold-key "a" 'edt-append)
  86.   (edt-bind-gold-key "A" 'edt-append)
  87.   (edt-bind-gold-key "h" 'edt-electric-user-keypad-help)
  88.   (edt-bind-gold-key "H" 'edt-electric-user-keypad-help)
  89.  
  90.   ;; Control bindings for regular keys.
  91.   (edt-bind-standard-key "\C-a" 'beginning-of-line)
  92.   (edt-bind-standard-key "\C-b" 'switch-to-buffer)
  93.   ;;; Leave binding of C-c as original prefix key.
  94.   (edt-bind-standard-key "\C-d" 'delete-char)
  95.   (edt-bind-standard-key "\C-e" 'end-of-line)
  96.   (edt-bind-standard-key "\C-f" 'forward-char)
  97.   (edt-bind-standard-key "\C-h" 'ehelp-command)
  98.   (edt-bind-standard-key "\C-i" 'indent-for-tab-command)
  99.   (edt-bind-standard-key "\C-j" 'edt-duplicate-word)
  100.   (edt-bind-standard-key "\C-l" 'edt-learn)
  101.   ;;; Leave binding of C-m to newline.
  102.   (edt-bind-standard-key "\C-o" 'open-line)
  103.   (edt-bind-standard-key "\C-p" 'fill-paragraph)
  104.   (edt-bind-standard-key "\C-q" 'quoted-insert)
  105.   ;;; Leave binding of C-r to isearch-backward.
  106.   ;;; Leave binding of C-s to isearch-forward.
  107.   (edt-bind-standard-key "\C-u" 'universal-argument)
  108.   ;;; Leave binding of C-x as original prefix key.
  109. )
  110.  
  111. ;;;
  112. ;;; VT100/VT200 SERIES USER EDT KEYPAD HELP
  113. ;;;
  114.  
  115. (defun edt-user-keypad-help ()
  116.   "
  117.                                 USER EDT Keypad Active
  118.  
  119.                                   +----------+----------+----------+----------+
  120.    F7: Copy Rectangle             |Prev Line |Next Line |Bkwd Char |Frwd Char |
  121.    F8: Cut Rect Overstrike        |   (UP)   |  (DOWN)  |  (LEFT)  | (RIGHT)  |
  122.  G-F8: Paste Rect Overstrike      |Window Top|Window Bot|Bkwd Sent |Frwd Sent |
  123.    F9: Cut Rect Insert            +----------+----------+----------+----------+
  124.  G-F9: Paste Rect Insert         
  125.   F11: ESC                        +----------+----------+----------+----------+
  126.   F12: Begining of Line           |   GOLD   |Query Repl|  FNDNXT  |Del Ent L |
  127. G-F12: Delete Other Windows       |   (PF1)  |   (PF2)  |   (PF3)  |   (PF4)  |
  128.   F13: Delete to Begin of Word    |Mark Wisel|Other Wind|   FIND   |  UND L   |
  129.  HELP: Emacs Help                 +----------+----------+----------+----------+
  130.    DO: Execute extended command   |   PAGE   |Scroll Win|Open Line |  DEL W   |
  131.                                   |    (7)   |    (8)   |    (9)   |   (-)    |
  132.   C-a: Beginning of Line          |Ex Ext Cmd|Fill Parag|Elim Tabs |  UND W   |
  133.   C-b: Switch to Buffer           +----------+----------+----------+----------+
  134.   C-d: Delete Character           |  ADVANCE |  BACKUP  | CUT/COPY |  DEL C   |
  135.   C-e: End of Line                |    (4)   |    (5)   |    (6)   |   (,)    |
  136.   C-f: Forward Character          |   BOTTOM |    TOP   |   Yank   |  UND C   |
  137.   C-g: Keyboard Quit              +----------+----------+----------+----------+
  138. G-C-g: Keyboard Quit              | Fwd Word |    EOL   | Bwd Word |  Change  |
  139.   C-h: Electric Emacs Help        |    (1)   |    (2)   |    (3)   | Direction|
  140. G-C-h: Emacs Help                 | CHNGCASE |  DEL EOL |   COPY   |          |
  141.   C-i: Indent for Tab             +---------------------+----------+  (ENTER) |
  142.   C-j: Duplicate Word             |         LINE        |SELECT/RES|          |
  143.   C-k: Define Key                 |         (0)         |    (.)   |  Toggle  |
  144. G-C-k: Restore Key                |      Open Line      |Center Lin|Insrt/Over|
  145.   C-l: Learn                      +---------------------+----------+----------+
  146.   C-n: Set Screen Width 80       
  147.   C-o: Open Line                       +----------+----------+----------+
  148.   C-p: Fill Paragraph                  |  FNDNXT  |   Yank   |    CUT   |
  149.   C-q: Quoted Insert                   |  (FIND)) | (INSERT) | (REMOVE) |
  150.   C-r: Isearch Backward                |   FIND   |          |   COPY   |
  151.   C-s: Isearch Forward                 +----------+----------+----------+
  152.   C-t: Display the Time                |SELECT/RES|SECT BACKW|SECT FORWA|
  153.   C-u: Universal Argument              | (SELECT) |(PREVIOUS)|  (NEXT)  |
  154.   C-v: Redraw Display                  |          |          |          |
  155.   C-w: Set Screen Width 132            +----------+----------+----------+
  156.   C-z: Suspend Emacs
  157. G-C-\\: Split Window
  158.  
  159.   G-a: Append to Kill Buffer
  160.   G-b: Buffer Menu
  161.   G-c: Compile
  162.   G-d: Delete Window
  163.   G-e: Exit
  164.   G-f: Find File
  165.   G-g: Find File Other Window
  166.   G-h: Keypad Help
  167.   G-i: Insert File
  168.   G-k: Toggle Capitalization Word
  169.   G-l: Lowercase Word or Region
  170.   G-m: Save Some Buffers
  171.   G-n: Next Error
  172.   G-o: Switch Windows
  173.   G-q: Quit
  174.   G-r: Revert File
  175.   G-s: Save Buffer
  176.   G-u: Uppercase Word or Region
  177.   G-v: Find File Other Window
  178.   G-w: Write file
  179.   G-y: EDT Emulation OFF
  180.   G-z: Switch to Default EDT Key Bindings
  181.   G-2: Split Window
  182.   G-%: Go to Percentage
  183.   G- : Undo  (GOLD Spacebar)
  184.   G-=: Go to Line
  185.   G-`: What line"
  186.  
  187.   (interactive)
  188.   (describe-function 'edt-user-keypad-help))
  189.