home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / gnu / emacs / help / 3755 < prev    next >
Encoding:
Text File  |  1992-08-17  |  5.8 KB  |  145 lines

  1. Path: sparky!uunet!channel1![rick.sheridan@channel1.com]
  2. From: "rick sheridan" <rick.sheridan@channel1.com>
  3. Newsgroups: gnu.emacs.help
  4. Subject: demacs vs. freemacs
  5. Message-ID: <1992Aug17.1277.2526@channel1>
  6. Date: 17 Aug 92 16:20:18 EST
  7. Reply-To: "rick sheridan" <rick.sheridan@channel1.com>
  8. Distribution: gnu
  9. Organization: Channel 1 Communications
  10. Lines: 133
  11.  
  12.  
  13.         On Sun, 16 Aug 1992 ara@zurich.ai.mit.edu (Allan Adler) wrote:
  14.  
  15. AA>Now that I am using demacs, I am noticing a lot of ways in which it
  16. AA>is superior to and inferior to freemacs. So I am wondering what I can
  17. AA>do to give demacs the good features I got used to with freemacs.
  18.  
  19. Here are some answers to a few of his questions.
  20.  
  21. AA>(3) In freemacs, you can use the alt key nearly interchangeably with
  22. AA>the escape key. In demacs apparently you cannot.
  23.  
  24. AA>(4) In freemacs, you can use both the backspace and the delete keys
  25. AA>for deletions, whereas in demacs the backspace key triggers HELP.
  26.  
  27. See my TERMCAP and IBMPC.EL below.
  28.  
  29. AA>(6) ^@ works in freemacs to mark the beginning of something you want
  30. AA>to move into the yank buffer, this being ended by ^w.. When I type ^@
  31. AA>in demacs, I get a beep but no message about the mark being set. By
  32. AA>^@ I mean ^-shift-2.
  33.  
  34. C-@ is ASCII NUL (hex 00).  And is generated by typing `C- '
  35. (control-space).  So to get rid of a *Help* buffer it tells you to type
  36. `C-@ =', i.e. `C- ='.  In the files below, set-mark-commmand is bound to
  37. INSERT.
  38.  
  39. The following exerpts are from my IBMPC.EL and TERMCAP files.  These
  40. changes were made from postings in this newsgroup over the past several
  41. months.
  42.  
  43. IBMPC.EL:
  44.  
  45. The folllowing changes set the cursor keys up to work like most other
  46. DOS editors, i.e. [home] goes to the beginning of the line and
  47. Ctrl-[right arrow] moves right one word.  The changes consist of
  48. commenting out (with semicolons) the two original `defun's and replacing
  49. them with a third.  Use everything between, but NOT including, the
  50. dashed lines.
  51.  
  52. ------------------------- cut here -------------------------------------
  53. (defun ibmpc-assign-special-key ()
  54. ;  (send-string-to-terminal "\e[0;71;\"\"p")   ; Home       -> M-<
  55. ;  (send-string-to-terminal "\e[0;72;\"\"p")   ; UpArrow    -> C-p
  56. ;  (send-string-to-terminal "\e[0;73;\"\ev\"p") ; PgUp       -> M-v
  57. ;  (send-string-to-terminal "\e[0;75;\"\"p")   ; LeftArrow  -> C-b
  58. ;  (send-string-to-terminal "\e[0;77;\"\"p")   ; RightArrow -> C-f
  59. ;  (send-string-to-terminal "\e[0;79;\"\"p")   ; End        -> M->
  60. ;  (send-string-to-terminal "\e[0;80;\"\"p")   ; DownArrow  -> C-n
  61. ;  (send-string-to-terminal "\e[0;81;\"\"p")   ; PgDn       -> C-v
  62. ; (send-string-to-terminal "\e[0;82;0;82p")     ; Ins
  63. ;  (send-string-to-terminal "\e[0;83;\"\"p")   ; Del        -> DEL
  64.   )
  65.  
  66. (defun ibmpc-cancel-special-key ()
  67. ;  (send-string-to-terminal "\e[0;71;0;71p")    ; Home
  68. ;  (send-string-to-terminal "\e[0;72;0;72p")    ; UpArrow
  69. ;  (send-string-to-terminal "\e[0;73;0;73p")    ; PgUp
  70. ;  (send-string-to-terminal "\e[0;75;0;75p")    ; LeftArrow
  71. ;  (send-string-to-terminal "\e[0;77;0;77p")    ; RightArrow
  72. ;  (send-string-to-terminal "\e[0;79;0;79p")    ; End
  73. ;  (send-string-to-terminal "\e[0;80;0;80p")    ; DownArrow
  74. ;  (send-string-to-terminal "\e[0;81;0;81p")    ; PgDn
  75. ; (send-string-to-terminal "\e[0;82;0;82p")     ; Ins
  76. ;  (send-string-to-terminal "\e[0;83;0;83p")    ; Del
  77.   )
  78.  
  79. ;;
  80.  
  81. (defvar ibmpc-map (make-keymap)
  82.   "The ibmpc-map maps the function keys on the IBMPC keyboard.")
  83.  
  84. ; special keys that replace the ansi keys above
  85.  
  86. (define-key ibmpc-map "R" 'set-mark-command)        ;insert
  87. (define-key ibmpc-map "S" 'delete-char)             ;delete
  88. (define-key ibmpc-map "G" 'beginning-of-line)       ;home
  89. (define-key ibmpc-map "w" 'beginning-of-buffer)     ;C-home
  90. (define-key ibmpc-map "O" 'end-of-line)             ;end
  91. (define-key ibmpc-map "u" 'end-of-buffer)           ;C-end
  92. (define-key ibmpc-map "I" 'scroll-down)             ;pgup
  93. (define-key ibmpc-map "Q" 'scroll-up)               ;pgdn
  94. (define-key ibmpc-map "H" 'previous-line)           ;up arrow
  95. (define-key ibmpc-map "P" 'next-line)               ;dn arrow
  96. (define-key ibmpc-map "K" 'backward-char)           ;lt arrow
  97. (define-key ibmpc-map "s" 'backward-word)           ;C-lt arrow
  98. (define-key ibmpc-map "M" 'forward-char)            ;rt arrow
  99. (define-key ibmpc-map "t" 'forward-word)            ;C-rt arrow
  100. ------------------------- cut here -------------------------------------
  101.  
  102. TERMCAP:
  103.  
  104. The enty below is ADDED to the TERMCAP file.  Then the TERM environment
  105. variable must be set as follows:
  106.  
  107.         set TERM=ibmpc-color
  108.  
  109. Case is significant.  Again, use everything between, but NOT including,
  110. the dashed lines.
  111.  
  112. ------------------------- cut here -------------------------------------
  113. #-----------------------------------------------------------------------
  114. #  IBM-PC with ANSI.SYS and Mike ressler@galileo.ifa.hawaii.edu 's ansi
  115. #  terminal color mods.
  116. #-----------------------------------------------------------------------
  117. ibmpc-color:\
  118.         :li#25:co#80:bs:pt:km:bl=^G:\
  119.         :le=\E[D:do=\E[B:\
  120.         :al@:dl@:AL@:DL@:ic@:dc@:IC@:DC@:cd@:\
  121.         :cs=\E[%i%d;%dr:im=\E[4h:ei=\E[4l:\
  122.         :us=\E[4m:ue=\E[0;1;33;44m:\
  123.         :ti=\E[0;1;37;44m:te=\E[2J:so=\E[37;45m:se=\E[0;1;37;44m:\
  124.         :mb=\E[5m:md=\E[1m:mr=\E[7m:mh=\E[2m:me=\E[0;1;37;44m:\
  125.         :tc=ansi:
  126. ------------------------- cut here -------------------------------------
  127.  
  128. This gives a bright white on blue screen (ti=\E[0;1;37;44m) with a
  129. bright white on magenta status line (so=\E[37;45m).  When exiting, a
  130. clear screen command is given (te=\E[2J).   Since I use 4DOS, this
  131. resets the screen colors to my normal ones.  This may be replaced with
  132. te=\E[0;1;37;44m to reset the screen colors to bright white on blue.
  133. Any other valid ANSI color commands may be used.
  134.  
  135. Hope this helps.  Many thanks to the people who provided me with the
  136. above info.
  137.  
  138. --Rick
  139.  
  140. rick.sheridan@channel1.com
  141.  
  142. --
  143. Channel 1 (R)   Cambridge, MA
  144.  
  145.