aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/emulation
diff options
context:
space:
mode:
authorRichard M. Stallman2005-07-03 19:25:36 +0000
committerRichard M. Stallman2005-07-03 19:25:36 +0000
commitf24cd32e9b9feac4f8f246cd75d7f0d36fef383c (patch)
treeb973fbda8411c2d3d4bceaf2aed370e79d22bd0f /lisp/emulation
parent65597a17bab28a1577dfaa4ceef75ba047f4d693 (diff)
downloademacs-f24cd32e9b9feac4f8f246cd75d7f0d36fef383c.tar.gz
emacs-f24cd32e9b9feac4f8f246cd75d7f0d36fef383c.zip
(tpu-emacs19-p): Var deleted. All references simplified.
Diffstat (limited to 'lisp/emulation')
-rw-r--r--lisp/emulation/tpu-edt.el30
1 files changed, 10 insertions, 20 deletions
diff --git a/lisp/emulation/tpu-edt.el b/lisp/emulation/tpu-edt.el
index 2f3315096aa..27f348853f1 100644
--- a/lisp/emulation/tpu-edt.el
+++ b/lisp/emulation/tpu-edt.el
@@ -307,18 +307,12 @@
307;;; Emacs version identifiers - currently referenced by 307;;; Emacs version identifiers - currently referenced by
308;;; 308;;;
309;;; o tpu-mark o tpu-set-mark 309;;; o tpu-mark o tpu-set-mark
310;;; o tpu-string-prompt o tpu-regexp-prompt 310;;; o mode line section o tpu-load-xkeys
311;;; o tpu-edt-on o tpu-load-xkeys
312;;; o tpu-update-mode-line o mode line section
313;;; 311;;;
314(defconst tpu-emacs19-p (not (string-lessp emacs-version "19"))
315 "Non-nil if we are running Lucid Emacs or version 19.")
316
317(defconst tpu-lucid-emacs19-p 312(defconst tpu-lucid-emacs19-p
318 (and tpu-emacs19-p (string-match "Lucid" emacs-version)) 313 (string-match "Lucid" emacs-version)
319 "Non-nil if we are running Lucid Emacs version 19.") 314 "Non-nil if we are running Lucid Emacs version 19.")
320 315
321
322;;; 316;;;
323;;; Global Keymaps 317;;; Global Keymaps
324;;; 318;;;
@@ -463,13 +457,12 @@ GOLD is the ASCII 7-bit escape sequence <ESC>OP.")
463(defun tpu-update-mode-line nil 457(defun tpu-update-mode-line nil
464 "Make sure mode-line in the current buffer reflects all changes." 458 "Make sure mode-line in the current buffer reflects all changes."
465 (setq tpu-mark-flag (if transient-mark-mode "" (if (tpu-mark) " @" " "))) 459 (setq tpu-mark-flag (if transient-mark-mode "" (if (tpu-mark) " @" " ")))
466 (cond (tpu-emacs19-p (force-mode-line-update)) 460 (force-mode-line-update))
467 (t (set-buffer-modified-p (buffer-modified-p)) (sit-for 0))))
468 461
469(cond (tpu-lucid-emacs19-p 462(cond (tpu-lucid-emacs19-p
470 (add-hook 'zmacs-deactivate-region-hook 'tpu-update-mode-line) 463 (add-hook 'zmacs-deactivate-region-hook 'tpu-update-mode-line)
471 (add-hook 'zmacs-activate-region-hook 'tpu-update-mode-line)) 464 (add-hook 'zmacs-activate-region-hook 'tpu-update-mode-line))
472 (tpu-emacs19-p 465 (t
473 (add-hook 'activate-mark-hook 'tpu-update-mode-line) 466 (add-hook 'activate-mark-hook 'tpu-update-mode-line)
474 (add-hook 'deactivate-mark-hook 'tpu-update-mode-line))) 467 (add-hook 'deactivate-mark-hook 'tpu-update-mode-line)))
475 468
@@ -542,13 +535,14 @@ Otherwise sets the tpu-match markers to nil and returns nil."
542(defun tpu-caar (thingy) (car (car thingy))) 535(defun tpu-caar (thingy) (car (car thingy)))
543(defun tpu-cadr (thingy) (car (cdr thingy))) 536(defun tpu-cadr (thingy) (car (cdr thingy)))
544 537
538(defvar zmacs-regions)
539
545(defun tpu-mark nil 540(defun tpu-mark nil
546 "TPU-edt version of the mark function. 541 "TPU-edt version of the mark function.
547Return the appropriate value of the mark for the current 542Return the appropriate value of the mark for the current
548version of Emacs." 543version of Emacs."
549 (cond (tpu-lucid-emacs19-p (mark (not zmacs-regions))) 544 (cond (tpu-lucid-emacs19-p (mark (not zmacs-regions)))
550 (tpu-emacs19-p (and mark-active (mark (not transient-mark-mode)))) 545 (and mark-active (mark (not transient-mark-mode)))))
551 (t (mark))))
552 546
553(defun tpu-set-mark (pos) 547(defun tpu-set-mark (pos)
554 "TPU-edt version of the `set-mark' function. 548 "TPU-edt version of the `set-mark' function.
@@ -559,9 +553,7 @@ current version of Emacs."
559 553
560(defun tpu-string-prompt (prompt history-symbol) 554(defun tpu-string-prompt (prompt history-symbol)
561 "Read a string with PROMPT." 555 "Read a string with PROMPT."
562 (if tpu-emacs19-p 556 (read-from-minibuffer prompt nil nil nil history-symbol))
563 (read-from-minibuffer prompt nil nil nil history-symbol)
564 (read-string prompt)))
565 557
566(defvar tpu-last-answer nil "Most recent response to tpu-y-or-n-p.") 558(defvar tpu-last-answer nil "Most recent response to tpu-y-or-n-p.")
567 559
@@ -1118,9 +1110,7 @@ kills modified buffers without asking."
1118(defun tpu-regexp-prompt (prompt) 1110(defun tpu-regexp-prompt (prompt)
1119 "Read a string, adding 'RE' to the prompt if tpu-regexp-p is set." 1111 "Read a string, adding 'RE' to the prompt if tpu-regexp-p is set."
1120 (let ((re-prompt (concat (if tpu-regexp-p "RE ") prompt))) 1112 (let ((re-prompt (concat (if tpu-regexp-p "RE ") prompt)))
1121 (if tpu-emacs19-p 1113 (read-from-minibuffer re-prompt nil nil nil 'tpu-regexp-prompt-hist)))
1122 (read-from-minibuffer re-prompt nil nil nil 'tpu-regexp-prompt-hist)
1123 (read-string re-prompt))))
1124 1114
1125(defun tpu-search-highlight nil 1115(defun tpu-search-highlight nil
1126 (if (tpu-check-match) 1116 (if (tpu-check-match)
@@ -2408,7 +2398,7 @@ If FILE is nil, try to load a default file. The default file names are
2408 (tpu-lucid-emacs19-p 2398 (tpu-lucid-emacs19-p
2409 (setq file (convert-standard-filename 2399 (setq file (convert-standard-filename
2410 (expand-file-name "~/.tpu-lucid-keys")))) 2400 (expand-file-name "~/.tpu-lucid-keys"))))
2411 (tpu-emacs19-p 2401 (t
2412 (setq file (convert-standard-filename 2402 (setq file (convert-standard-filename
2413 (expand-file-name "~/.tpu-keys"))) 2403 (expand-file-name "~/.tpu-keys")))
2414 (and (not (file-exists-p file)) 2404 (and (not (file-exists-p file))