annotate lisp/emulation/tpu-mapper.el @ 5834:5391898ea85c

(calendar-print-mayan-date): Use new error arg to calendar-cursor-to-date.
author Richard M. Stallman <rms@gnu.org>
date Mon, 07 Feb 1994 20:55:00 +0000
parents 9cde7d7fea1f
children 0e9eddc5d598
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
4421
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1 ;;; tpu-mapper.el --- Create a TPU-edt keymap file for x-windows emacs.
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
3 ;; Copyright (C) 1993 Free Software Foundation, Inc.
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
4
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
5 ;; Author: Rob Riepel <riepel@networking.stanford.edu>
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
6 ;; Maintainer: Rob Riepel <riepel@networking.stanford.edu>
5140
9cde7d7fea1f Comment change.
Richard M. Stallman <rms@gnu.org>
parents: 4548
diff changeset
7 ;; Keywords: emulations
4421
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
8
4450
325bc5407213 entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 4421
diff changeset
9 ;; This file is part of GNU Emacs.
325bc5407213 entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 4421
diff changeset
10
325bc5407213 entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 4421
diff changeset
11 ;; GNU Emacs is free software; you can redistribute it and/or modify
325bc5407213 entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 4421
diff changeset
12 ;; it under the terms of the GNU General Public License as published by
325bc5407213 entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 4421
diff changeset
13 ;; the Free Software Foundation; either version 2, or (at your option)
325bc5407213 entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 4421
diff changeset
14 ;; any later version.
4421
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
15
4450
325bc5407213 entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 4421
diff changeset
16 ;; GNU Emacs is distributed in the hope that it will be useful,
325bc5407213 entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 4421
diff changeset
17 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
325bc5407213 entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 4421
diff changeset
18 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
325bc5407213 entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 4421
diff changeset
19 ;; GNU General Public License for more details.
325bc5407213 entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 4421
diff changeset
20
325bc5407213 entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 4421
diff changeset
21 ;; You should have received a copy of the GNU General Public License
325bc5407213 entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 4421
diff changeset
22 ;; along with GNU Emacs; see the file COPYING. If not, write to
325bc5407213 entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 4421
diff changeset
23 ;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
4421
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
24
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
25 ;;; Commentary:
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
26
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
27 ;; This emacs lisp program can be used to create an emacs lisp file that
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
28 ;; defines the TPU-edt keypad for emacs running on x-windows. Please read
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
29 ;; the "Usage" AND "Known Problems" sections before attempting to run this
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
30 ;; program.
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
31
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
32 ;;; Usage:
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
33
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
34 ;; Simply load this file into the X-windows version of emacs (version 19)
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
35 ;; using the following command.
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
36
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
37 ;; emacs -q -l tpu-mapper.el
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
38
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
39 ;; The "-q" option prevents loading of your .emacs file (commands therein
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
40 ;; might confuse this program).
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
41
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
42 ;; An instruction screen showing the TPU-edt keypad will be displayed, and
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
43 ;; you will be prompted to press the TPU-edt editing keys. Tpu-mapper uses
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
44 ;; the keys you press to create an emacs lisp file that will define a
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
45 ;; TPU-edt keypad for your X server. You can even re-arrange the standard
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
46 ;; EDT keypad to suit your tastes (or to cope with those silly Sun and PC
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
47 ;; keypads).
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
48
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
49 ;; Finally, you will be prompted for the name of the file to store the key
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
50 ;; definitions. If you chose the default, TPU-edt will find it and load it
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
51 ;; automatically. If you specify a different file name, you will need to
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
52 ;; set the variable "tpu-xkeys-file" before loading TPU-edt. Here's how
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
53 ;; you might go about doing that in your .emacs file.
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
54
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
55 ;; (setq tpu-xkeys-file (expand-file-name "~/.my-emacs-x-keys"))
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
56 ;; (load "tpu-edt")
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
57
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
58 ;;; Known Problems:
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
59
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
60 ;; Sometimes, tpu-mapper will ignore a key you press, and just continue to
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
61 ;; prompt for the same key. This can happen when your window manager sucks
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
62 ;; up the key and doesn't pass it on to emacs, or it could be an emacs bug.
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
63 ;; Either way, there's nothing that tpu-mapper can do about it. You must
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
64 ;; press RETURN, to skip the current key and continue. Later, you and/or
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
65 ;; your local X guru can try to figure out why the key is being ignored.
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
66
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
67 ;;; Code:
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
68
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
69 ;;;
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
70 ;;; Revision Information
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
71 ;;;
5140
9cde7d7fea1f Comment change.
Richard M. Stallman <rms@gnu.org>
parents: 4548
diff changeset
72 (defconst tpu-mapper-revision "$Revision: 1.4 $"
4421
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
73 "Revision number of TPU-edt x-windows emacs key mapper.")
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
74
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
75
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
76 ;;;
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
77 ;;; Make sure we're running X-windows and Emacs version 19
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
78 ;;;
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
79 (cond
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
80 ((not (and window-system (not (string-lessp emacs-version "19"))))
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
81 (insert "
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
82
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
83 Whoa! This isn't going to work...
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
84
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
85 You must run tpu-mapper.el under X-windows and Emacs version 19.
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
86
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
87 Press any key to exit. ")
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
88 (sit-for 600)
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
89 (kill-emacs t)))
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
90
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
91
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
92 ;;;
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
93 ;;; Decide whether we're running GNU or Lucid emacs.
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
94 ;;;
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
95 (defconst tpu-lucid-emacs19-p (string-match "Lucid" emacs-version)
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
96 "Non-NIL if we are running Lucid Emacs version 19.")
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
97
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
98
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
99 ;;;
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
100 ;;; Key variables
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
101 ;;;
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
102 (defvar tpu-key nil)
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
103 (defvar tpu-enter nil)
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
104 (defvar tpu-return nil)
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
105 (defvar tpu-key-seq nil)
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
106 (defvar tpu-enter-seq nil)
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
107 (defvar tpu-return-seq nil)
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
108
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
109
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
110 ;;;
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
111 ;;; Make sure the window is big enough to display the instructions
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
112 ;;;
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
113 (if tpu-lucid-emacs19-p (set-screen-size nil 80 36)
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
114 (set-frame-size (selected-frame) 80 36))
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
115
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
116
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
117 ;;;
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
118 ;;; Create buffers - Directions, Keys, Gold-Keys
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
119 ;;;
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
120 (if (not (get-buffer "Directions")) (generate-new-buffer "Directions"))
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
121 (if (not (get-buffer "Keys")) (generate-new-buffer "Keys"))
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
122 (if (not (get-buffer "Gold-Keys")) (generate-new-buffer "Gold-Keys"))
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
123
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
124
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
125 ;;;
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
126 ;;; Put headers in the Keys buffer
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
127 ;;;
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
128 (set-buffer "Keys")
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
129 (insert "\
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
130 ;; Key definitions for TPU-edt
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
131 ;;
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
132 ")
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
133
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
134
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
135 ;;;
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
136 ;;; Display directions
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
137 ;;;
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
138 (switch-to-buffer "Directions")
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
139 (insert "
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
140 This program prompts you to press keys to create a custom keymap file
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
141 for use with the x-windows version of emacs and TPU-edt.
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
142
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
143 Start by pressing the RETURN key, and continue by pressing the keys
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
144 specified in the mini-buffer. You can re-arrange the TPU-edt keypad
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
145 by pressing any key you want at any prompt. If you want to entirely
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
146 omit a key, just press RETURN at the prompt.
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
147
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
148 Here's a picture of the standard TPU/edt keypad for reference:
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
149
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
150 _______________________ _______________________________
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
151 | HELP | Do | | | | | |
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
152 |KeyDefs| | | | | | |
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
153 |_______|_______________| |_______|_______|_______|_______|
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
154 _______________________ _______________________________
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
155 | Find |Insert |Remove | | Gold | HELP |FndNxt | Del L |
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
156 | | |Sto Tex| | key |E-Help | Find |Undel L|
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
157 |_______|_______|_______| |_______|_______|_______|_______|
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
158 |Select |Pre Scr|Nex Scr| | Page | Sect |Append | Del W |
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
159 | Reset |Pre Win|Nex Win| | Do | Fill |Replace|Undel W|
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
160 |_______|_______|_______| |_______|_______|_______|_______|
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
161 |Move up| |Forward|Reverse|Remove | Del C |
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
162 | Top | |Bottom | Top |Insert |Undel C|
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
163 _______|_______|_______ |_______|_______|_______|_______|
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
164 |Mov Lef|Mov Dow|Mov Rig| | Word | EOL | Char | |
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
165 |StaOfLi|Bottom |EndOfLi| |ChngCas|Del EOL|SpecIns| Enter |
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
166 |_______|_______|_______| |_______|_______|_______| |
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
167 | Line |Select | Subs |
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
168 | Open Line | Reset | |
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
169 |_______________|_______|_______|
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
170
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
171
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
172 ")
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
173 (delete-other-windows)
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
174
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
175 ;;;
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
176 ;;; Save <CR> for future reference
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
177 ;;;
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
178 (cond
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
179 (tpu-lucid-emacs19-p
4525
03d1a39e66c9 (tpu-gnu-map-key): Repaired the key name
Richard M. Stallman <rms@gnu.org>
parents: 4450
diff changeset
180 (setq tpu-return-seq (read-key-sequence "Hit carriage-return <CR> to continue "))
4421
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
181 (setq tpu-return (concat "[" (format "%s" (event-key (aref tpu-return-seq 0))) "]")))
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
182 (t
4525
03d1a39e66c9 (tpu-gnu-map-key): Repaired the key name
Richard M. Stallman <rms@gnu.org>
parents: 4450
diff changeset
183 (message "Hit carriage-return <CR> to continue ")
03d1a39e66c9 (tpu-gnu-map-key): Repaired the key name
Richard M. Stallman <rms@gnu.org>
parents: 4450
diff changeset
184 (setq tpu-return-seq (read-event))
03d1a39e66c9 (tpu-gnu-map-key): Repaired the key name
Richard M. Stallman <rms@gnu.org>
parents: 4450
diff changeset
185 (setq tpu-return (concat "[" (format "%s" tpu-return-seq) "]"))))
4421
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
186
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
187
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
188 ;;;
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
189 ;;; Key mapping functions
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
190 ;;;
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
191 (defun tpu-lucid-map-key (ident descrip func gold-func)
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
192 (interactive)
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
193 (setq tpu-key-seq (read-key-sequence (format "Press %s%s: " ident descrip)))
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
194 (setq tpu-key (concat "[" (format "%s" (event-key (aref tpu-key-seq 0))) "]"))
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
195 (cond ((not (equal tpu-key tpu-return))
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
196 (set-buffer "Keys")
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
197 (insert (format"(global-set-key %s %s)\n" tpu-key func))
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
198 (set-buffer "Gold-Keys")
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
199 (insert (format "(define-key GOLD-map %s %s)\n" tpu-key gold-func))
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
200 (set-buffer "Directions"))
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
201 ;; bogosity to get next prompt to come up, if the user hits <CR>!
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
202 ;; check periodically to see if this is still needed...
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
203 (t
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
204 (format "%s" tpu-key)))
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
205 tpu-key)
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
206
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
207 (defun tpu-gnu-map-key (ident descrip func gold-func)
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
208 (interactive)
4525
03d1a39e66c9 (tpu-gnu-map-key): Repaired the key name
Richard M. Stallman <rms@gnu.org>
parents: 4450
diff changeset
209 (message "Press %s%s: " ident descrip)
03d1a39e66c9 (tpu-gnu-map-key): Repaired the key name
Richard M. Stallman <rms@gnu.org>
parents: 4450
diff changeset
210 (setq tpu-key-seq (read-event))
03d1a39e66c9 (tpu-gnu-map-key): Repaired the key name
Richard M. Stallman <rms@gnu.org>
parents: 4450
diff changeset
211 (setq tpu-key (concat "[" (format "%s" tpu-key-seq) "]"))
4421
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
212 (cond ((not (equal tpu-key tpu-return))
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
213 (set-buffer "Keys")
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
214 (insert (format"(global-set-key %s %s)\n" tpu-key func))
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
215 (set-buffer "Gold-Keys")
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
216 (insert (format "(define-key GOLD-map %s %s)\n" tpu-key gold-func))
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
217 (set-buffer "Directions"))
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
218 ;; bogosity to get next prompt to come up, if the user hits <CR>!
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
219 ;; check periodically to see if this is still needed...
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
220 (t
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
221 (format "%s" tpu-key)))
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
222 tpu-key)
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
223
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
224 (fset 'tpu-map-key (if tpu-lucid-emacs19-p 'tpu-lucid-map-key 'tpu-gnu-map-key))
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
225
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
226
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
227 (set-buffer "Keys")
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
228 (insert "
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
229 ;; Arrows
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
230 ;;
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
231 ")
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
232 (set-buffer "Gold-Keys")
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
233 (insert "
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
234 ;; GOLD Arrows
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
235 ;;
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
236 ")
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
237 (set-buffer "Directions")
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
238
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
239 (tpu-map-key "Up-Arrow" "" "'tpu-previous-line" "'tpu-move-to-beginning")
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
240 (tpu-map-key "Down-arrow" "" "'tpu-next-line" "'tpu-move-to-end")
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
241 (tpu-map-key "Right-arrow" "" "'tpu-forward-char" "'end-of-line")
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
242 (tpu-map-key "Left-arrow" "" "'tpu-backward-char" "'beginning-of-line")
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
243
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
244
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
245 (set-buffer "Keys")
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
246 (insert "
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
247 ;; PF keys
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
248 ;;
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
249 ")
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
250 (set-buffer "Gold-Keys")
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
251 (insert "
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
252 ;; GOLD PF keys
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
253 ;;
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
254 ")
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
255 (set-buffer "Directions")
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
256
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
257 (tpu-map-key "PF1" " - The GOLD key" "GOLD-map" "'keyboard-quit")
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
258 (tpu-map-key "PF2" " - The Keypad Help key" "'tpu-help" "'help-for-help")
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
259 (tpu-map-key "PF3" " - The Find/Find-Next key" "'tpu-search-again" "'tpu-search")
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
260 (tpu-map-key "PF4" " - The Del/Undelete Line key" "'tpu-delete-current-line" "'tpu-undelete-lines")
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
261
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
262 (set-buffer "Keys")
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
263 (insert "
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
264 ;; KP0-9 KP- KP, KP. and KPenter
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
265 ;;
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
266 ")
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
267 (set-buffer "Gold-Keys")
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
268 (insert "
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
269 ;; GOLD KP0-9 KP- KP, and KPenter
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
270 ;;
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
271 ")
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
272 (set-buffer "Directions")
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
273
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
274 (tpu-map-key "KP-0" " - The Line/Open-Line key" "'tpu-line" "'open-line")
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
275 (tpu-map-key "KP-1" " - The Word/Change-Case key" "'tpu-word" "'tpu-change-case")
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
276 (tpu-map-key "KP-2" " - The EOL/Delete-EOL key" "'tpu-end-of-line" "'tpu-delete-to-eol")
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
277 (tpu-map-key "KP-3" " - The Character/Special-Insert key" "'tpu-char" "'tpu-special-insert")
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
278 (tpu-map-key "KP-4" " - The Forward/Bottom key" "'tpu-advance-direction" "'tpu-move-to-end")
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
279 (tpu-map-key "KP-5" " - The Reverse/Top key" "'tpu-backup-direction" "'tpu-move-to-beginning")
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
280 (tpu-map-key "KP-6" " - The Remove/Insert key" "'tpu-cut" "'tpu-paste")
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
281 (tpu-map-key "KP-7" " - The Page/Do key" "'tpu-page" "'execute-extended-command")
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
282 (tpu-map-key "KP-8" " - The Section/Fill key" "'tpu-scroll-window" "'tpu-fill")
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
283 (tpu-map-key "KP-9" " - The Append/Replace key" "'tpu-append-region" "'tpu-replace")
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
284 (tpu-map-key "KP--" " - The Delete/Undelete Word key" "'tpu-delete-current-word" "'tpu-undelete-words")
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
285 (tpu-map-key "KP-," " - The Delete/Undelete Character key" "'tpu-delete-current-char" "'tpu-undelete-char")
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
286 (tpu-map-key "KP-." " - The Select/Reset key" "'tpu-select" "'tpu-unselect")
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
287 (tpu-map-key "KP-Enter" " - The Enter key on the numeric keypad" "'newline" "'tpu-substitute")
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
288 ;; Save the enter key
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
289 (setq tpu-enter tpu-key)
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
290 (setq tpu-enter-seq tpu-key-seq)
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
291
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
292 (set-buffer "Keys")
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
293 (insert "
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
294 ;; Editing keypad (find, insert, remove)
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
295 ;; (select, prev, next)
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
296 ;;
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
297 ")
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
298 (set-buffer "Gold-Keys")
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
299 (insert "
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
300 ;; GOLD Editing keypad (find, insert, remove)
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
301 ;; (select, prev, next)
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
302 ;;
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
303 ")
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
304 (set-buffer "Directions")
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
305
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
306 (tpu-map-key "Find" " - The Find key on the editing keypad" "'tpu-search" "'nil")
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
307 (tpu-map-key "Insert" " - The Insert key on the editing keypad" "'tpu-paste" "'nil")
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
308 (tpu-map-key "Remove" " - The Remove key on the editing keypad" "'tpu-cut" "'tpu-store-text")
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
309 (tpu-map-key "Select" " - The Select key on the editing keypad" "'tpu-select" "'tpu-unselect")
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
310 (tpu-map-key "Prev Scr" " - The Prev Scr key on the editing keypad" "'tpu-scroll-window-down" "'tpu-previous-window")
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
311 (tpu-map-key "Next Scr" " - The Next Scr key on the editing keypad" "'tpu-scroll-window-up" "'tpu-next-window")
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
312
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
313 (set-buffer "Keys")
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
314 (insert "
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
315 ;; F10-14 Help Do F17
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
316 ;;
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
317 ")
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
318 (set-buffer "Gold-Keys")
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
319 (insert "
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
320 ;; GOLD F10-14 Help Do F17
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
321 ;;
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
322 ")
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
323 (set-buffer "Directions")
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
324
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
325 (tpu-map-key "F10" " - Invokes the Exit function on VT200+ terminals" "'tpu-exit" "'nil")
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
326 (tpu-map-key "F11" " - Inserts an Escape character into the text" "'tpu-insert-escape" "'nil")
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
327 (tpu-map-key "Backspace" " - Not Delete nor ^H! Sometimes on the F12 key" "'tpu-next-beginning-of-line" "'nil")
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
328 (tpu-map-key "F13" " - Invokes the delete previous word function" "'tpu-delete-previous-word" "'nil")
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
329 (tpu-map-key "F14" " - Toggles insert/overstrike modes" "'tpu-toggle-overwrite-mode" "'nil")
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
330 (tpu-map-key "Help" " - Brings up the help screen, same as PF2" "'tpu-help" "'describe-bindings")
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
331 (tpu-map-key "Do" " - Invokes the COMMAND function" "'execute-extended-command" "'nil")
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
332 (tpu-map-key "F17" "" "'tpu-goto-breadcrumb" "'tpu-drop-breadcrumb")
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
333
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
334 (set-buffer "Gold-Keys")
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
335 (cond
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
336 ((not (equal tpu-enter tpu-return))
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
337 (insert "
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
338 ;; Minibuffer map additions to make KP_enter = RET
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
339 ;;
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
340 ")
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
341
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
342 (insert (format "(define-key minibuffer-local-map %s 'exit-minibuffer)\n" tpu-enter))
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
343 (insert (format "(define-key minibuffer-local-ns-map %s 'exit-minibuffer)\n" tpu-enter))
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
344 (insert (format "(define-key minibuffer-local-completion-map %s 'exit-minibuffer)\n" tpu-enter))
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
345 (insert (format "(define-key minibuffer-local-must-match-map %s 'minibuffer-complete-and-exit)\n" tpu-enter))))
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
346
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
347 (insert "
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
348 ;; Define the tpu-help-enter/return symbols
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
349 ;;
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
350 ")
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
351
4525
03d1a39e66c9 (tpu-gnu-map-key): Repaired the key name
Richard M. Stallman <rms@gnu.org>
parents: 4450
diff changeset
352 (cond (tpu-lucid-emacs19-p
03d1a39e66c9 (tpu-gnu-map-key): Repaired the key name
Richard M. Stallman <rms@gnu.org>
parents: 4450
diff changeset
353 (insert (format "(setq tpu-help-enter \"%s\")\n" tpu-enter-seq))
4548
fb0f96c4154b Insert setqs for tpu-help-... variables.
Richard M. Stallman <rms@gnu.org>
parents: 4525
diff changeset
354 (insert (format "(setq tpu-help-return \"%s\")\n" tpu-return-seq))
fb0f96c4154b Insert setqs for tpu-help-... variables.
Richard M. Stallman <rms@gnu.org>
parents: 4525
diff changeset
355 (insert "(setq tpu-help-N \"[#<keypress-event N>]\")\n")
fb0f96c4154b Insert setqs for tpu-help-... variables.
Richard M. Stallman <rms@gnu.org>
parents: 4525
diff changeset
356 (insert "(setq tpu-help-n \"[#<keypress-event n>]\")\n")
fb0f96c4154b Insert setqs for tpu-help-... variables.
Richard M. Stallman <rms@gnu.org>
parents: 4525
diff changeset
357 (insert "(setq tpu-help-P \"[#<keypress-event P>]\")\n")
fb0f96c4154b Insert setqs for tpu-help-... variables.
Richard M. Stallman <rms@gnu.org>
parents: 4525
diff changeset
358 (insert "(setq tpu-help-p \"[#<keypress-event p>]\")\n"))
4525
03d1a39e66c9 (tpu-gnu-map-key): Repaired the key name
Richard M. Stallman <rms@gnu.org>
parents: 4450
diff changeset
359 (t
03d1a39e66c9 (tpu-gnu-map-key): Repaired the key name
Richard M. Stallman <rms@gnu.org>
parents: 4450
diff changeset
360 (insert (format "(setq tpu-help-enter \"%s\")\n" tpu-enter))))
4421
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
361
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
362 (append-to-buffer "Keys" 1 (point))
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
363 (set-buffer "Keys")
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
364
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
365 ;;;
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
366 ;;; Save the key mapping program and blow this pop stand
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
367 ;;;
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
368 (let ((file (if tpu-lucid-emacs19-p "~/.tpu-lucid-keys" "~/.tpu-gnu-keys")))
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
369 (set-visited-file-name
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
370 (read-file-name (format "Save key mapping to file (default %s): " file) nil file)))
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
371 (save-buffer)
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
372
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
373 (message "That's it! Press any key to exit")
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
374 (sit-for 600)
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
375 (kill-emacs t)
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
376
95bb7e28d761 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
377 ;;; tpu-mapper.el ends here