Path: utzoo!utgpu!jarvis.csri.toronto.edu!clyde.concordia.ca!uunet!ateng!chip From: chip@ateng.com (Chip Salzenberg) Newsgroups: comp.unix.xenix Subject: Re: ansi.el? Message-ID: <25915E01.4036@ateng.com> Date: 21 Dec 89 22:49:36 GMT References: <6812@tank.uchicago.edu> Organization: A T Engineering, Tampa, FL Lines: 62 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 '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))) ;; [ 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