ansi.el?
Chip Salzenberg
chip at ateng.com
Fri Dec 22 09:49:36 AEST 1989
Here's mine...
#! /bin/sh
# This is a shell archive. Remove anything before this line, then unpack
# it by saving it into a file and typing "sh file". To overwrite existing
# files, type "sh file -c". You can also feed this as standard input via
# unshar, or by typing "sh <file", e.g.. If this archive is complete, you
# will see the following message at the end:
# "End of shell archive."
# Contents: ansi.el
# Wrapped by chip at ateng on Thu Dec 21 17:49:23 1989
PATH=/bin:/usr/bin:/usr/ucb ; export PATH
if test -f 'ansi.el' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'ansi.el'\"
else
echo shar: Extracting \"'ansi.el'\" \(1093 characters\)
sed "s/^X//" >'ansi.el' <<'END_OF_FILE'
X;; Map Xenix console function key escape sequences
X;; into the standard slots in function-keymap.
X
X(require 'keypad)
X
X(defvar ANSI-map nil
X "The ANSI-map maps the function keys on the ANSI keyboard.")
X
X(if (not ANSI-map)
X (progn
X (setq ANSI-map (lookup-key global-map "\e["))
X (if (not (keymapp ANSI-map))
X (setq ANSI-map (make-sparse-keymap))) ;; <ESC>[ commands
X
X (setup-terminal-keymap ANSI-map
X '(("A" . ?u) ; up arrow
X ("B" . ?d) ; down-arrow
X ("C" . ?r) ; right-arrow
X ("D" . ?l) ; left-arrow
X ("L" . ?I) ; insert
X ("G" . ?N) ; next-page
X ("I" . ?P) ; previous-page
X ))))
X
X(defun enable-arrow-keys ()
X "Enable the use of the ANSI arrow keys for cursor motion.
XBecause of the nature of the ANSI console, this unavoidably breaks
Xthe standard Emacs command ESC [; therefore, it is not done by default,
Xbut only if you give this command."
X (interactive)
X (global-set-key "\e[" ANSI-map))
X
X;;
X;; The Xenix console keyboard mapping at A T E has metakeys.
X;;
X
X(setq meta-flag t)
END_OF_FILE
if test 1093 -ne `wc -c <'ansi.el'`; then
echo shar: \"'ansi.el'\" unpacked with wrong size!
fi
# end of 'ansi.el'
fi
echo shar: End of shell archive.
exit 0
More information about the Comp.unix.xenix
mailing list