aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1995-04-25 00:37:27 +0000
committerRichard M. Stallman1995-04-25 00:37:27 +0000
commit691a38f0d925ac1e7fd40ef176642254fedb9fcb (patch)
tree528abf1160a036bd0e0c2c1c101c39ad7664399a
parentc25b40ed7448358f31f9c506fe7627a9b6ade5ca (diff)
downloademacs-691a38f0d925ac1e7fd40ef176642254fedb9fcb.tar.gz
emacs-691a38f0d925ac1e7fd40ef176642254fedb9fcb.zip
Don't turn on tpu-edt mode.
(tpu-gnu-emacs19-p): Function deleted. Callers changed. (tpu-load-xkeys): Use file name .tpu-keys by default. (tpu-gnu-emacs18-p): Function deleted.
-rw-r--r--lisp/emulation/tpu-edt.el46
1 files changed, 17 insertions, 29 deletions
diff --git a/lisp/emulation/tpu-edt.el b/lisp/emulation/tpu-edt.el
index d816ceac008..74cb0501765 100644
--- a/lisp/emulation/tpu-edt.el
+++ b/lisp/emulation/tpu-edt.el
@@ -59,17 +59,11 @@
59;;; o tpu-update-mode-line o mode line section 59;;; o tpu-update-mode-line o mode line section
60;;; 60;;;
61(defconst tpu-emacs19-p (not (string-lessp emacs-version "19")) 61(defconst tpu-emacs19-p (not (string-lessp emacs-version "19"))
62 "Non-NIL if we are running Lucid or GNU Emacs version 19.") 62 "Non-nil if we are running Lucid Emacs or version 19.")
63
64(defconst tpu-gnu-emacs18-p (not tpu-emacs19-p)
65 "Non-NIL if we are running GNU Emacs version 18.")
66 63
67(defconst tpu-lucid-emacs19-p 64(defconst tpu-lucid-emacs19-p
68 (and tpu-emacs19-p (string-match "Lucid" emacs-version)) 65 (and tpu-emacs19-p (string-match "Lucid" emacs-version))
69 "Non-NIL if we are running Lucid Emacs version 19.") 66 "Non-nil if we are running Lucid Emacs version 19.")
70
71(defconst tpu-gnu-emacs19-p (and tpu-emacs19-p (not tpu-lucid-emacs19-p))
72 "Non-NIL if we are running GNU Emacs version 19.")
73 67
74 68
75;;; 69;;;
@@ -99,7 +93,7 @@ GOLD is the ASCII 7-bit escape sequence <ESC>OP.")
99 93
100(and tpu-lucid-emacs19-p 94(and tpu-lucid-emacs19-p
101 (defvar minibuffer-local-ns-map (make-sparse-keymap) 95 (defvar minibuffer-local-ns-map (make-sparse-keymap)
102 "Hack to give Lucid emacs the same maps as GNU emacs.")) 96 "Hack to give Lucid Emacs the same maps as ordinary Emacs."))
103 97
104 98
105;;; 99;;;
@@ -224,12 +218,12 @@ GOLD is the ASCII 7-bit escape sequence <ESC>OP.")
224 (cond (tpu-emacs19-p (force-mode-line-update)) 218 (cond (tpu-emacs19-p (force-mode-line-update))
225 (t (set-buffer-modified-p (buffer-modified-p)) (sit-for 0)))) 219 (t (set-buffer-modified-p (buffer-modified-p)) (sit-for 0))))
226 220
227(cond (tpu-gnu-emacs19-p 221(cond (tpu-lucid-emacs19-p
228 (add-hook 'activate-mark-hook 'tpu-update-mode-line)
229 (add-hook 'deactivate-mark-hook 'tpu-update-mode-line))
230 (tpu-lucid-emacs19-p
231 (add-hook 'zmacs-deactivate-region-hook 'tpu-update-mode-line) 222 (add-hook 'zmacs-deactivate-region-hook 'tpu-update-mode-line)
232 (add-hook 'zmacs-activate-region-hook 'tpu-update-mode-line))) 223 (add-hook 'zmacs-activate-region-hook 'tpu-update-mode-line))
224 (tpu-emacs19-p
225 (add-hook 'activate-mark-hook 'tpu-update-mode-line)
226 (add-hook 'deactivate-mark-hook 'tpu-update-mode-line)))
233 227
234 228
235;;; 229;;;
@@ -303,15 +297,15 @@ Otherwise sets the tpu-match markers to nil and returns nil."
303(defun tpu-mark nil 297(defun tpu-mark nil
304 "TPU-edt version of the mark function. 298 "TPU-edt version of the mark function.
305Return the appropriate value of the mark for the current 299Return the appropriate value of the mark for the current
306version of emacs." 300version of Emacs."
307 (cond (tpu-lucid-emacs19-p (mark (not zmacs-regions))) 301 (cond (tpu-lucid-emacs19-p (mark (not zmacs-regions)))
308 (tpu-gnu-emacs19-p (and mark-active (mark (not transient-mark-mode)))) 302 (tpu-emacs19-p (and mark-active (mark (not transient-mark-mode))))
309 (t (mark)))) 303 (t (mark))))
310 304
311(defun tpu-set-mark (pos) 305(defun tpu-set-mark (pos)
312 "TPU-edt verion of the set-mark function. 306 "TPU-edt verion of the `set-mark' function.
313Sets the mark at POS and activates the region acording to the 307Sets the mark at POS and activates the region acording to the
314current version of emacs." 308current version of Emacs."
315 (set-mark pos) 309 (set-mark pos)
316 (and tpu-lucid-emacs19-p pos (zmacs-activate-region))) 310 (and tpu-lucid-emacs19-p pos (zmacs-activate-region)))
317 311
@@ -326,7 +320,7 @@ current version of emacs."
326(defun tpu-y-or-n-p (prompt &optional not-yes) 320(defun tpu-y-or-n-p (prompt &optional not-yes)
327 "Prompt for a y or n answer with positive default. 321 "Prompt for a y or n answer with positive default.
328Optional second argument NOT-YES changes default to negative. 322Optional second argument NOT-YES changes default to negative.
329Like emacs y-or-n-p, also accepts space as y and DEL as n." 323Like Emacs `y-or-n-p', but also accepts space as y and DEL as n."
330 (message (format "%s[%s]" prompt (if not-yes "n" "y"))) 324 (message (format "%s[%s]" prompt (if not-yes "n" "y")))
331 (let ((doit t)) 325 (let ((doit t))
332 (while doit 326 (while doit
@@ -2089,16 +2083,16 @@ Accepts a prefix argument for the number of tpu-pan-columns to scroll."
2089(defun tpu-load-xkeys (file) 2083(defun tpu-load-xkeys (file)
2090 "Load the TPU-edt X-windows key definitions FILE. 2084 "Load the TPU-edt X-windows key definitions FILE.
2091If FILE is nil, try to load a default file. The default file names are 2085If FILE is nil, try to load a default file. The default file names are
2092~/.tpu-lucid-keys for Lucid emacs, and ~/.tpu-gnu-keys for GNU emacs." 2086`~/.tpu-lucid-keys' for Lucid emacs, and `~/.tpu-keys' for Emacs."
2093 (interactive "fX key definition file: ") 2087 (interactive "fX key definition file: ")
2094 (cond (file 2088 (cond (file
2095 (setq file (expand-file-name file))) 2089 (setq file (expand-file-name file)))
2096 (tpu-xkeys-file 2090 (tpu-xkeys-file
2097 (setq file (expand-file-name tpu-xkeys-file))) 2091 (setq file (expand-file-name tpu-xkeys-file)))
2098 (tpu-gnu-emacs19-p
2099 (setq file (expand-file-name "~/.tpu-gnu-keys")))
2100 (tpu-lucid-emacs19-p 2092 (tpu-lucid-emacs19-p
2101 (setq file (expand-file-name "~/.tpu-lucid-keys")))) 2093 (setq file (expand-file-name "~/.tpu-lucid-keys")))
2094 (tpu-emacs19-p
2095 (setq file (expand-file-name "~/.tpu-keys"))))
2102 (cond ((file-readable-p file) 2096 (cond ((file-readable-p file)
2103 (load-file file)) 2097 (load-file file))
2104 (t 2098 (t
@@ -2175,12 +2169,6 @@ If FILE is nil, try to load a default file. The default file names are
2175 (use-global-map global-map) 2169 (use-global-map global-map)
2176 (setq tpu-edt-mode nil)))) 2170 (setq tpu-edt-mode nil))))
2177 2171
2178
2179;;;
2180;;; Turn on TPU-edt and announce it as a feature
2181;;;
2182(tpu-edt-mode)
2183
2184(provide 'tpu-edt) 2172(provide 'tpu-edt)
2185 2173
2186;;; tpu-edt.el ends here 2174;;; tpu-edt.el ends here