diff options
| author | Richard M. Stallman | 1995-04-25 00:42:22 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1995-04-25 00:42:22 +0000 |
| commit | 23e16ac449ec4d9e1940a2a534c408fd3069dcd3 (patch) | |
| tree | f785cc32e1ff2ad743027f443036035800d41e59 | |
| parent | 691a38f0d925ac1e7fd40ef176642254fedb9fcb (diff) | |
| download | emacs-23e16ac449ec4d9e1940a2a534c408fd3069dcd3.tar.gz emacs-23e16ac449ec4d9e1940a2a534c408fd3069dcd3.zip | |
At end, use default file name .tpu-keys.
Do not kill Emacs.
(tpu-emacs-map-key): Renamed from tpu-gnu-map-key.
| -rw-r--r-- | lisp/emulation/tpu-mapper.el | 28 |
1 files changed, 9 insertions, 19 deletions
diff --git a/lisp/emulation/tpu-mapper.el b/lisp/emulation/tpu-mapper.el index 4db45b15368..ea7eeef805a 100644 --- a/lisp/emulation/tpu-mapper.el +++ b/lisp/emulation/tpu-mapper.el | |||
| @@ -41,7 +41,7 @@ | |||
| 41 | 41 | ||
| 42 | ;; An instruction screen showing the TPU-edt keypad will be displayed, and | 42 | ;; An instruction screen showing the TPU-edt keypad will be displayed, and |
| 43 | ;; you will be prompted to press the TPU-edt editing keys. Tpu-mapper uses | 43 | ;; you will be prompted to press the TPU-edt editing keys. Tpu-mapper uses |
| 44 | ;; the keys you press to create an emacs lisp file that will define a | 44 | ;; the keys you press to create an Emacs Lisp file that will define a |
| 45 | ;; TPU-edt keypad for your X server. You can even re-arrange the standard | 45 | ;; TPU-edt keypad for your X server. You can even re-arrange the standard |
| 46 | ;; EDT keypad to suit your tastes (or to cope with those silly Sun and PC | 46 | ;; EDT keypad to suit your tastes (or to cope with those silly Sun and PC |
| 47 | ;; keypads). | 47 | ;; keypads). |
| @@ -59,7 +59,7 @@ | |||
| 59 | 59 | ||
| 60 | ;; Sometimes, tpu-mapper will ignore a key you press, and just continue to | 60 | ;; Sometimes, tpu-mapper will ignore a key you press, and just continue to |
| 61 | ;; prompt for the same key. This can happen when your window manager sucks | 61 | ;; prompt for the same key. This can happen when your window manager sucks |
| 62 | ;; up the key and doesn't pass it on to emacs, or it could be an emacs bug. | 62 | ;; up the key and doesn't pass it on to Emacs, or it could be an Emacs bug. |
| 63 | ;; Either way, there's nothing that tpu-mapper can do about it. You must | 63 | ;; Either way, there's nothing that tpu-mapper can do about it. You must |
| 64 | ;; press RETURN, to skip the current key and continue. Later, you and/or | 64 | ;; press RETURN, to skip the current key and continue. Later, you and/or |
| 65 | ;; your local X guru can try to figure out why the key is being ignored. | 65 | ;; your local X guru can try to figure out why the key is being ignored. |
| @@ -71,19 +71,11 @@ | |||
| 71 | ;;; | 71 | ;;; |
| 72 | (cond | 72 | (cond |
| 73 | ((not (and window-system (not (string-lessp emacs-version "19")))) | 73 | ((not (and window-system (not (string-lessp emacs-version "19")))) |
| 74 | (insert " | 74 | (error "tpu-mapper requires running in Emacs 19, with an X display"))) |
| 75 | |||
| 76 | Whoa! This isn't going to work... | ||
| 77 | |||
| 78 | You must run tpu-mapper.el under X-windows and Emacs version 19. | ||
| 79 | |||
| 80 | Press any key to exit. ") | ||
| 81 | (sit-for 600) | ||
| 82 | (kill-emacs t))) | ||
| 83 | 75 | ||
| 84 | 76 | ||
| 85 | ;;; | 77 | ;;; |
| 86 | ;;; Decide whether we're running GNU or Lucid emacs. | 78 | ;;; Decide whether we're running Lucid Emacs or Emacs itself. |
| 87 | ;;; | 79 | ;;; |
| 88 | (defconst tpu-lucid-emacs19-p (string-match "Lucid" emacs-version) | 80 | (defconst tpu-lucid-emacs19-p (string-match "Lucid" emacs-version) |
| 89 | "Non-NIL if we are running Lucid Emacs version 19.") | 81 | "Non-NIL if we are running Lucid Emacs version 19.") |
| @@ -133,7 +125,7 @@ | |||
| 133 | (switch-to-buffer "Directions") | 125 | (switch-to-buffer "Directions") |
| 134 | (insert " | 126 | (insert " |
| 135 | This program prompts you to press keys to create a custom keymap file | 127 | This program prompts you to press keys to create a custom keymap file |
| 136 | for use with the x-windows version of emacs and TPU-edt. | 128 | for use with the x-windows version of Emacs and TPU-edt. |
| 137 | 129 | ||
| 138 | Start by pressing the RETURN key, and continue by pressing the keys | 130 | Start by pressing the RETURN key, and continue by pressing the keys |
| 139 | specified in the mini-buffer. You can re-arrange the TPU-edt keypad | 131 | specified in the mini-buffer. You can re-arrange the TPU-edt keypad |
| @@ -200,7 +192,7 @@ | |||
| 200 | (format "%s" tpu-key))) | 192 | (format "%s" tpu-key))) |
| 201 | tpu-key) | 193 | tpu-key) |
| 202 | 194 | ||
| 203 | (defun tpu-gnu-map-key (ident descrip func gold-func) | 195 | (defun tpu-emacs-map-key (ident descrip func gold-func) |
| 204 | (interactive) | 196 | (interactive) |
| 205 | (message "Press %s%s: " ident descrip) | 197 | (message "Press %s%s: " ident descrip) |
| 206 | (setq tpu-key-seq (read-event)) | 198 | (setq tpu-key-seq (read-event)) |
| @@ -217,7 +209,7 @@ | |||
| 217 | (format "%s" tpu-key))) | 209 | (format "%s" tpu-key))) |
| 218 | tpu-key) | 210 | tpu-key) |
| 219 | 211 | ||
| 220 | (fset 'tpu-map-key (if tpu-lucid-emacs19-p 'tpu-lucid-map-key 'tpu-gnu-map-key)) | 212 | (fset 'tpu-map-key (if tpu-lucid-emacs19-p 'tpu-lucid-map-key 'tpu-emacs-map-key)) |
| 221 | 213 | ||
| 222 | 214 | ||
| 223 | (set-buffer "Keys") | 215 | (set-buffer "Keys") |
| @@ -371,13 +363,11 @@ | |||
| 371 | ;;; | 363 | ;;; |
| 372 | ;;; Save the key mapping program and blow this pop stand | 364 | ;;; Save the key mapping program and blow this pop stand |
| 373 | ;;; | 365 | ;;; |
| 374 | (let ((file (if tpu-lucid-emacs19-p "~/.tpu-lucid-keys" "~/.tpu-gnu-keys"))) | 366 | (let ((file (if tpu-lucid-emacs19-p "~/.tpu-lucid-keys" "~/.tpu-keys"))) |
| 375 | (set-visited-file-name | 367 | (set-visited-file-name |
| 376 | (read-file-name (format "Save key mapping to file (default %s): " file) "" file))) | 368 | (read-file-name (format "Save key mapping to file (default %s): " file) "" file))) |
| 377 | (save-buffer) | 369 | (save-buffer) |
| 378 | 370 | ||
| 379 | (message "That's it! Press any key to exit") | 371 | (message "tpu-mapper done") |
| 380 | (sit-for 600) | ||
| 381 | (kill-emacs t) | ||
| 382 | 372 | ||
| 383 | ;;; tpu-mapper.el ends here | 373 | ;;; tpu-mapper.el ends here |