home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!channel1![rick.sheridan@channel1.com]
- From: "rick sheridan" <rick.sheridan@channel1.com>
- Newsgroups: gnu.emacs.help
- Subject: demacs vs. freemacs
- Message-ID: <1992Aug17.1277.2526@channel1>
- Date: 17 Aug 92 16:20:18 EST
- Reply-To: "rick sheridan" <rick.sheridan@channel1.com>
- Distribution: gnu
- Organization: Channel 1 Communications
- Lines: 133
-
-
- On Sun, 16 Aug 1992 ara@zurich.ai.mit.edu (Allan Adler) wrote:
-
- AA>Now that I am using demacs, I am noticing a lot of ways in which it
- AA>is superior to and inferior to freemacs. So I am wondering what I can
- AA>do to give demacs the good features I got used to with freemacs.
-
- Here are some answers to a few of his questions.
-
- AA>(3) In freemacs, you can use the alt key nearly interchangeably with
- AA>the escape key. In demacs apparently you cannot.
-
- AA>(4) In freemacs, you can use both the backspace and the delete keys
- AA>for deletions, whereas in demacs the backspace key triggers HELP.
-
- See my TERMCAP and IBMPC.EL below.
-
- AA>(6) ^@ works in freemacs to mark the beginning of something you want
- AA>to move into the yank buffer, this being ended by ^w.. When I type ^@
- AA>in demacs, I get a beep but no message about the mark being set. By
- AA>^@ I mean ^-shift-2.
-
- C-@ is ASCII NUL (hex 00). And is generated by typing `C- '
- (control-space). So to get rid of a *Help* buffer it tells you to type
- `C-@ =', i.e. `C- ='. In the files below, set-mark-commmand is bound to
- INSERT.
-
- The following exerpts are from my IBMPC.EL and TERMCAP files. These
- changes were made from postings in this newsgroup over the past several
- months.
-
- IBMPC.EL:
-
- The folllowing changes set the cursor keys up to work like most other
- DOS editors, i.e. [home] goes to the beginning of the line and
- Ctrl-[right arrow] moves right one word. The changes consist of
- commenting out (with semicolons) the two original `defun's and replacing
- them with a third. Use everything between, but NOT including, the
- dashed lines.
-
- ------------------------- cut here -------------------------------------
- (defun ibmpc-assign-special-key ()
- ; (send-string-to-terminal "\e[0;71;\"\"p") ; Home -> M-<
- ; (send-string-to-terminal "\e[0;72;\"\"p") ; UpArrow -> C-p
- ; (send-string-to-terminal "\e[0;73;\"\ev\"p") ; PgUp -> M-v
- ; (send-string-to-terminal "\e[0;75;\"\"p") ; LeftArrow -> C-b
- ; (send-string-to-terminal "\e[0;77;\"\"p") ; RightArrow -> C-f
- ; (send-string-to-terminal "\e[0;79;\"\"p") ; End -> M->
- ; (send-string-to-terminal "\e[0;80;\"\"p") ; DownArrow -> C-n
- ; (send-string-to-terminal "\e[0;81;\"\"p") ; PgDn -> C-v
- ; (send-string-to-terminal "\e[0;82;0;82p") ; Ins
- ; (send-string-to-terminal "\e[0;83;\"\"p") ; Del -> DEL
- )
-
- (defun ibmpc-cancel-special-key ()
- ; (send-string-to-terminal "\e[0;71;0;71p") ; Home
- ; (send-string-to-terminal "\e[0;72;0;72p") ; UpArrow
- ; (send-string-to-terminal "\e[0;73;0;73p") ; PgUp
- ; (send-string-to-terminal "\e[0;75;0;75p") ; LeftArrow
- ; (send-string-to-terminal "\e[0;77;0;77p") ; RightArrow
- ; (send-string-to-terminal "\e[0;79;0;79p") ; End
- ; (send-string-to-terminal "\e[0;80;0;80p") ; DownArrow
- ; (send-string-to-terminal "\e[0;81;0;81p") ; PgDn
- ; (send-string-to-terminal "\e[0;82;0;82p") ; Ins
- ; (send-string-to-terminal "\e[0;83;0;83p") ; Del
- )
-
- ;;
-
- (defvar ibmpc-map (make-keymap)
- "The ibmpc-map maps the function keys on the IBMPC keyboard.")
-
- ; special keys that replace the ansi keys above
-
- (define-key ibmpc-map "R" 'set-mark-command) ;insert
- (define-key ibmpc-map "S" 'delete-char) ;delete
- (define-key ibmpc-map "G" 'beginning-of-line) ;home
- (define-key ibmpc-map "w" 'beginning-of-buffer) ;C-home
- (define-key ibmpc-map "O" 'end-of-line) ;end
- (define-key ibmpc-map "u" 'end-of-buffer) ;C-end
- (define-key ibmpc-map "I" 'scroll-down) ;pgup
- (define-key ibmpc-map "Q" 'scroll-up) ;pgdn
- (define-key ibmpc-map "H" 'previous-line) ;up arrow
- (define-key ibmpc-map "P" 'next-line) ;dn arrow
- (define-key ibmpc-map "K" 'backward-char) ;lt arrow
- (define-key ibmpc-map "s" 'backward-word) ;C-lt arrow
- (define-key ibmpc-map "M" 'forward-char) ;rt arrow
- (define-key ibmpc-map "t" 'forward-word) ;C-rt arrow
- ------------------------- cut here -------------------------------------
-
- TERMCAP:
-
- The enty below is ADDED to the TERMCAP file. Then the TERM environment
- variable must be set as follows:
-
- set TERM=ibmpc-color
-
- Case is significant. Again, use everything between, but NOT including,
- the dashed lines.
-
- ------------------------- cut here -------------------------------------
- #-----------------------------------------------------------------------
- # IBM-PC with ANSI.SYS and Mike ressler@galileo.ifa.hawaii.edu 's ansi
- # terminal color mods.
- #-----------------------------------------------------------------------
- ibmpc-color:\
- :li#25:co#80:bs:pt:km:bl=^G:\
- :le=\E[D:do=\E[B:\
- :al@:dl@:AL@:DL@:ic@:dc@:IC@:DC@:cd@:\
- :cs=\E[%i%d;%dr:im=\E[4h:ei=\E[4l:\
- :us=\E[4m:ue=\E[0;1;33;44m:\
- :ti=\E[0;1;37;44m:te=\E[2J:so=\E[37;45m:se=\E[0;1;37;44m:\
- :mb=\E[5m:md=\E[1m:mr=\E[7m:mh=\E[2m:me=\E[0;1;37;44m:\
- :tc=ansi:
- ------------------------- cut here -------------------------------------
-
- This gives a bright white on blue screen (ti=\E[0;1;37;44m) with a
- bright white on magenta status line (so=\E[37;45m). When exiting, a
- clear screen command is given (te=\E[2J). Since I use 4DOS, this
- resets the screen colors to my normal ones. This may be replaced with
- te=\E[0;1;37;44m to reset the screen colors to bright white on blue.
- Any other valid ANSI color commands may be used.
-
- Hope this helps. Many thanks to the people who provided me with the
- above info.
-
- --Rick
-
- rick.sheridan@channel1.com
-
- --
- Channel 1 (R) Cambridge, MA
-
-