home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Source Code 1993 July / THE_SOURCE_CODE_CD_ROM.iso / languages / elisp / packages / fix-my-terminal / README.fix-my-terminal < prev    next >
Encoding:
Text File  |  1993-03-26  |  6.0 KB  |  153 lines

  1. file:  README.fix-my-terminal         v1.0        Mar 24 1993
  2. See any gnu source file for the standard copyright statement which
  3. applies to this file.
  4.  
  5. FIX MY TERMINAL!
  6.  
  7. Is your terminal is beeping at you spontaneously saying:
  8. Failing I-search: ^Q
  9. Type C-g a couple of times and type M-x flow.  
  10. ---
  11. Do you try to do an I-search with C-s or save a file with C-x C-s and
  12. your terminal just stares blankly back at you?  Type C-q and M-x flow.
  13. ---
  14. Are you having trouble with the fact that your terminal has no ESC
  15. key?  Type C-[ x esc (that's the sure fire way to do M-x esc).
  16. ---
  17. Are your arrow keys causing strange cursor movement and generating
  18. annoying charaters?  Make sure the environment variable TERM is set to
  19. something like vt100 or vt200.
  20. ---
  21. Are your arrow keys OK, but the function keys are broken?  Make sure your
  22. terminal is in vt200+ mode and type M-x function-key-fix.  
  23. ---
  24. Is there a better way?  Maybe.  See the documentation on the above
  25. functions (type C-h f <function name>), their automatic
  26. counterparts (auto-<function name>) and their associated variables
  27. (type C-h v <variable name>).  
  28. ---
  29. Other problems?  Refer to the FAQ (frequently asked questions) file in
  30. /usr/local/emacs/etc/ or FTP to
  31.        /rtfm.mit.edu:pub/usenet/news.answers/GNU-Emacs-FAQ/ part*
  32.  
  33.  
  34.  
  35. TO THE EMACS INSTALLER:
  36.  
  37. "Fix-my-terminal" is a collection of emacs lisp functions which solve
  38. common problems associated with vtxxx terminals: turning on the arrow
  39. and function keys, getting around flow control, providing an escape
  40. key for vt200 terminals.  Not all of the fixes are perfect!  See the
  41. documentation in each file for detailed discussions.
  42.  
  43. These functions were developed to fit into a standard emacs 18
  44. distribution.  
  45.  
  46.  
  47. INSTALLATION:
  48.  
  49. To install fix-my-terminal, put the tar file to the your site's lisp
  50. directory (the lisp directory with the subdirectory term/) and type
  51. tar -xvf fix-my-terminal.tar.  This will dump the following files:
  52.  
  53. README.fix-my-terminal
  54. arrow-key-fix.el
  55. flow-ctrl.el
  56. keyad.el
  57. keypad.elc
  58. term/vt100.el
  59. term/vt102.el
  60. ....
  61. term/vtxxx.el
  62. vt200-esc-fix.el
  63.  
  64.  
  65. Move this file (README.fix-my-terminal) to a user visible place (e.g.
  66. /usr/local/emacs).  
  67.  
  68. Decide whether or not you should turn the function keys on by default.
  69. If you don't use any dumb terminals (e.g. all your stuff is X
  70. hardware) and people at your site use ESC-[ as backwards paragraph,
  71. the answer is no (of course you probably wouldn't be reading this if
  72. you didn't have any terminals).  If you have lots of vt200 type
  73. terminals and beginning emacs users, the answer is probably yes (or
  74. you will always be answering the above questions!).
  75.  
  76. Copy the following code into default.el _after_ any site
  77. term-setup-hook.  Un-comment the "if" if your site wants the
  78. function keys by default.
  79.  
  80. (require 'flow-ctrl)
  81. (auto-flow-control-fix)
  82. (require 'vt200-esc-fix)
  83. (auto-escape-key-fix)
  84. (require 'function-key-fix)
  85. ;;(if (boundp 'no-function-keys)
  86. ;;    (auto-function-key-fix))
  87. ;;;; ESC-[ as backward-paragraph is lost unless you put the following
  88. ;;;; line in your .emacs file:
  89. ;;;;     (setq no-function-keys t)
  90. ;;;; !!! No term-setup-hook below this point !!!
  91.  
  92. If you know what sorts of terminals your site uses and their
  93. associated problems, you might want to set the variables
  94. terminal-uses-flow-control-chars and terminal-needs-escape-key in your
  95. default.el.  Makes sure you don't overwrite the user's list, though:
  96.  
  97. (require 'flow-ctrl)
  98. (if (not terminal-uses-flow-control-chars)
  99.     ;; Don't overwrite user's list.
  100.     (setq terminal-uses-flow-control-chars 
  101.        '("vt52" "vt100" "vt200")))
  102. (auto-flow-control-fix)
  103.  
  104.  
  105.  
  106. Send bug reports and suggestions for improvement to Jeff Morgenthaler
  107. (jpmorgen@wisp4.physics.wisc.edu).
  108.  
  109.  
  110.  LCD Archive Entry:
  111.  fix-my-terminal|Jeff Morgenthaler|jpmorgen@wisp4.physics.wisc.edu|
  112.  Fixes:  flow control, arrow keys, escape key, and vt200 function keys|
  113.  93-03-23|1.0|~/packages/fix-my-terminal.tar.Z
  114.  
  115.  Archived at archive.cis.ohio-state.edu
  116.  
  117.  
  118. PS.  Here is a hack that will get emacs running as it's own X client
  119. to use this vtxxx stuff.  You just have to have the following code in
  120. your default.el file (before calling auto-enable-arrow-keys) and use
  121. xmodmap as described.  I realize that this might conflict with SUN
  122. specific stuff if you use both SUN and ANSI 105 key (vt200) keyboards,
  123. or if you have non vtxxx terminals.  You will have to hack some logic
  124. suitable for your particular situation around the load statement if
  125. this is the case.
  126.  
  127. (load "term/vtxxx" nil t)
  128. ;; the term/ is in case TERM is not set (in which case term-prefix is
  129. ;; not defined) 
  130.  
  131. (setq user-term-setup-hook term-setup-hook)                             
  132. (setq term-setup-hook                                                   
  133.       (function                                                         
  134.        (lambda ()                                                       
  135.          ;; A horrible hack to get remove key on VT200 keyboards        
  136.          ;; working in emacs' own xterms.  You must feed the following  
  137.          ;; code to xmodmap to get this to work:                        
  138.                                                                         
  139.          ;; keycode 140 = F17                                           
  140.          ;; ! Fix dead "Remove" key for emacs by mapping it to F17      
  141.          ;; ! Code in default.el maps F17 to 'kill-region.              
  142.          ;; ! Note that remove key is thus messed up for other software.
  143.          ;; ! Hope that emacs-19 has a better fix.                      
  144.                                                                         
  145.          (and (fboundp 'enable-arrow-keys)                              
  146.               (progn                                                    
  147.                 (enable-arrow-keys)                                     
  148.                 (define-key CSI-map "31~" 'kill-region))   ; F17        
  149.               )                                                         
  150.          (and user-term-setup-hook                                      
  151.               (funcall user-term-setup-hook))                           
  152.          )                                                              
  153.        ))