X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/14beddf4711854b01d400f36166dc71eb39435bb..e22f333ddb1af56334146583e3bdbcf85cf189d6:/lisp/emulation/edt-mapper.el diff --git a/lisp/emulation/edt-mapper.el b/lisp/emulation/edt-mapper.el index 99d204692f..9e3667e7a8 100644 --- a/lisp/emulation/edt-mapper.el +++ b/lisp/emulation/edt-mapper.el @@ -1,6 +1,6 @@ ;;; edt-mapper.el --- create an EDT LK-201 map file for X-Windows Emacs -;; Copyright (C) 1994-1995, 2000-2011 Free Software Foundation, Inc. +;; Copyright (C) 1994-1995, 2000-2015 Free Software Foundation, Inc. ;; Author: Kevin Gallagher ;; Maintainer: Kevin Gallagher @@ -61,7 +61,7 @@ ;; emacs -q -l edt-mapper.el -;; The "-q" option prevents loading of your .emacs file (commands +;; The "-q" option prevents loading of your init file (commands ;; therein might confuse this program). ;; An instruction screen showing the typical LK-201 terminal @@ -74,7 +74,7 @@ ;; and loaded automatically when the EDT emulation is started. If ;; you specify a different file name, you will need to set the ;; variable "edt-keys-file" before starting the EDT emulation. -;; Here's how you might go about doing that in your .emacs file. +;; Here's how you might go about doing that in your init file: ;; (setq edt-keys-file (expand-file-name "~/.my-emacs-keys")) @@ -96,6 +96,10 @@ ;;; Code: +;; Otherwise it just hangs. This seems preferable. +(if noninteractive + (error "edt-mapper cannot be loaded in batch mode")) + ;;; ;;; Decide Emacs Variant, GNU Emacs or XEmacs (aka Lucid Emacs). ;;; Determine Window System, and X Server Vendor (if appropriate). @@ -151,7 +155,7 @@ ;;; Logic in simple.el maps some of these unassigned function keys to ;;; ordinary typing keys. Where this is the case, a call to ;;; read-key-sequence, below, does not return the name of the function -;;; key pressd by the user but, instead, it returns the name of the +;;; key pressed by the user but, instead, it returns the name of the ;;; key to which it has been mapped. It needs to know the name of the ;;; key pressed by the user. As a workaround, we assign a function to ;;; each of the unassigned function keys of interest, here. These @@ -293,26 +297,26 @@ Here's a picture of the standard LK-201 keypad for reference: - _______________________ _______________________________ - | HELP | DO | | F17 | F18 | F19 | F20 | - | | | | | | | | - |_______|_______________| |_______|_______|_______|_______| - _______________________ _______________________________ - | FIND |INSERT |REMOVE | | PF1 | PF2 | PF3 | PF4 | - | | | | | | | | | - |_______|_______|_______| |_______|_______|_______|_______| - |SELECT |PREVIOU| NEXT | | KP7 | KP8 | KP9 | KP- | - | | | | | | | | | - |_______|_______|_______| |_______|_______|_______|_______| - | UP | | KP4 | KP5 | KP6 | KP, | - | | | | | | | - _______|_______|_______ |_______|_______|_______|_______| - | LEFT | DOWN | RIGHT | | KP1 | KP2 | KP3 | | - | | | | | | | | | - |_______|_______|_______| |_______|_______|_______| KPE | - | KP0 | KPP | | - | | | | - |_______________|_______|_______| + ________________________ _______________________________ + | HELP | DO | | F17 | F18 | F19 | F20 | + | | | | | | | | + |_______|________________| |_______|_______|_______|_______| + ________________________ _______________________________ + | FIND |INSERT |REMOVE | | PF1 | PF2 | PF3 | PF4 | + | | | | | | | | | + |_______|________|_______| |_______|_______|_______|_______| + |SELECT |PREVIOUS|NEXT | | KP7 | KP8 | KP9 | KP- | + | | | | | | | | | + |_______|________|_______| |_______|_______|_______|_______| + | UP | | KP4 | KP5 | KP6 | KP, | + | | | | | | | + _______|________|_______ |_______|_______|_______|_______| + | LEFT | DOWN | RIGHT | | KP1 | KP2 | KP3 | | + | | | | | | | | | + |_______|________|_______| |_______|_______|_______| KPE | + | KP0 | KPP | | + | | | | + |_______________|_______|_______| REMEMBER: JUST PRESS RETURN TO SKIP MAPPING A KEY. @@ -325,20 +329,20 @@ PRESS THE KEY SPECIFIED IN THE MINIBUFFER BELOW. - _______________________ _______________________________ - | HELP | DO | | F17 | F18 | F19 | F20 | - |_______|_______________| |_______|_______|_______|_______| - _______________________ _______________________________ - | FIND |INSERT |REMOVE | | PF1 | PF2 | PF3 | PF4 | - |_______|_______|_______| |_______|_______|_______|_______| - |SELECT |PREVIOU| NEXT | | KP7 | KP8 | KP9 | KP- | - |_______|_______|_______| |_______|_______|_______|_______| - | UP | | KP4 | KP5 | KP6 | KP, | - _______|_______|_______ |_______|_______|_______|_______| - | LEFT | DOWN | RIGHT | | KP1 | KP2 | KP3 | | - |_______|_______|_______| |_______|_______|_______| KPE | - | KP0 | KPP | | - |_______________|_______|_______| + ________________________ _______________________________ + | HELP | DO | | F17 | F18 | F19 | F20 | + |_______|________________| |_______|_______|_______|_______| + ________________________ _______________________________ + | FIND |INSERT |REMOVE | | PF1 | PF2 | PF3 | PF4 | + |_______|________|_______| |_______|_______|_______|_______| + |SELECT |PREVIOUS| NEXT | | KP7 | KP8 | KP9 | KP- | + |_______|________|_______| |_______|_______|_______|_______| + | UP | | KP4 | KP5 | KP6 | KP, | + _______|________|_______ |_______|_______|_______|_______| + | LEFT | DOWN | RIGHT | | KP1 | KP2 | KP3 | | + |_______|________|_______| |_______|_______|_______| KPE | + | KP0 | KPP | | + |_______________|_______|_______| REMEMBER: JUST PRESS RETURN TO SKIP MAPPING A KEY."))) @@ -349,7 +353,7 @@ (defun edt-map-key (ident descrip) (interactive) (if (featurep 'xemacs) - (progn + (progn (setq edt-key-seq (read-key-sequence (format "Press %s%s: " ident descrip))) (setq edt-key (concat "[" (format "%s" (event-key (aref edt-key-seq 0))) "]")) (cond ((not (equal edt-key edt-return))