mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2025-01-31 20:02:42 +00:00
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.
This commit is contained in:
parent
c25b40ed74
commit
691a38f0d9
@ -59,17 +59,11 @@
|
||||
;;; o tpu-update-mode-line o mode line section
|
||||
;;;
|
||||
(defconst tpu-emacs19-p (not (string-lessp emacs-version "19"))
|
||||
"Non-NIL if we are running Lucid or GNU Emacs version 19.")
|
||||
|
||||
(defconst tpu-gnu-emacs18-p (not tpu-emacs19-p)
|
||||
"Non-NIL if we are running GNU Emacs version 18.")
|
||||
"Non-nil if we are running Lucid Emacs or version 19.")
|
||||
|
||||
(defconst tpu-lucid-emacs19-p
|
||||
(and tpu-emacs19-p (string-match "Lucid" emacs-version))
|
||||
"Non-NIL if we are running Lucid Emacs version 19.")
|
||||
|
||||
(defconst tpu-gnu-emacs19-p (and tpu-emacs19-p (not tpu-lucid-emacs19-p))
|
||||
"Non-NIL if we are running GNU Emacs version 19.")
|
||||
"Non-nil if we are running Lucid Emacs version 19.")
|
||||
|
||||
|
||||
;;;
|
||||
@ -99,7 +93,7 @@ GOLD is the ASCII 7-bit escape sequence <ESC>OP.")
|
||||
|
||||
(and tpu-lucid-emacs19-p
|
||||
(defvar minibuffer-local-ns-map (make-sparse-keymap)
|
||||
"Hack to give Lucid emacs the same maps as GNU emacs."))
|
||||
"Hack to give Lucid Emacs the same maps as ordinary Emacs."))
|
||||
|
||||
|
||||
;;;
|
||||
@ -224,12 +218,12 @@ GOLD is the ASCII 7-bit escape sequence <ESC>OP.")
|
||||
(cond (tpu-emacs19-p (force-mode-line-update))
|
||||
(t (set-buffer-modified-p (buffer-modified-p)) (sit-for 0))))
|
||||
|
||||
(cond (tpu-gnu-emacs19-p
|
||||
(add-hook 'activate-mark-hook 'tpu-update-mode-line)
|
||||
(add-hook 'deactivate-mark-hook 'tpu-update-mode-line))
|
||||
(tpu-lucid-emacs19-p
|
||||
(cond (tpu-lucid-emacs19-p
|
||||
(add-hook 'zmacs-deactivate-region-hook 'tpu-update-mode-line)
|
||||
(add-hook 'zmacs-activate-region-hook 'tpu-update-mode-line)))
|
||||
(add-hook 'zmacs-activate-region-hook 'tpu-update-mode-line))
|
||||
(tpu-emacs19-p
|
||||
(add-hook 'activate-mark-hook 'tpu-update-mode-line)
|
||||
(add-hook 'deactivate-mark-hook 'tpu-update-mode-line)))
|
||||
|
||||
|
||||
;;;
|
||||
@ -303,15 +297,15 @@ Otherwise sets the tpu-match markers to nil and returns nil."
|
||||
(defun tpu-mark nil
|
||||
"TPU-edt version of the mark function.
|
||||
Return the appropriate value of the mark for the current
|
||||
version of emacs."
|
||||
version of Emacs."
|
||||
(cond (tpu-lucid-emacs19-p (mark (not zmacs-regions)))
|
||||
(tpu-gnu-emacs19-p (and mark-active (mark (not transient-mark-mode))))
|
||||
(tpu-emacs19-p (and mark-active (mark (not transient-mark-mode))))
|
||||
(t (mark))))
|
||||
|
||||
(defun tpu-set-mark (pos)
|
||||
"TPU-edt verion of the set-mark function.
|
||||
"TPU-edt verion of the `set-mark' function.
|
||||
Sets the mark at POS and activates the region acording to the
|
||||
current version of emacs."
|
||||
current version of Emacs."
|
||||
(set-mark pos)
|
||||
(and tpu-lucid-emacs19-p pos (zmacs-activate-region)))
|
||||
|
||||
@ -326,7 +320,7 @@ current version of emacs."
|
||||
(defun tpu-y-or-n-p (prompt &optional not-yes)
|
||||
"Prompt for a y or n answer with positive default.
|
||||
Optional second argument NOT-YES changes default to negative.
|
||||
Like emacs y-or-n-p, also accepts space as y and DEL as n."
|
||||
Like Emacs `y-or-n-p', but also accepts space as y and DEL as n."
|
||||
(message (format "%s[%s]" prompt (if not-yes "n" "y")))
|
||||
(let ((doit t))
|
||||
(while doit
|
||||
@ -2089,16 +2083,16 @@ Accepts a prefix argument for the number of tpu-pan-columns to scroll."
|
||||
(defun tpu-load-xkeys (file)
|
||||
"Load the TPU-edt X-windows key definitions FILE.
|
||||
If FILE is nil, try to load a default file. The default file names are
|
||||
~/.tpu-lucid-keys for Lucid emacs, and ~/.tpu-gnu-keys for GNU emacs."
|
||||
`~/.tpu-lucid-keys' for Lucid emacs, and `~/.tpu-keys' for Emacs."
|
||||
(interactive "fX key definition file: ")
|
||||
(cond (file
|
||||
(setq file (expand-file-name file)))
|
||||
(tpu-xkeys-file
|
||||
(setq file (expand-file-name tpu-xkeys-file)))
|
||||
(tpu-gnu-emacs19-p
|
||||
(setq file (expand-file-name "~/.tpu-gnu-keys")))
|
||||
(tpu-lucid-emacs19-p
|
||||
(setq file (expand-file-name "~/.tpu-lucid-keys"))))
|
||||
(setq file (expand-file-name "~/.tpu-lucid-keys")))
|
||||
(tpu-emacs19-p
|
||||
(setq file (expand-file-name "~/.tpu-keys"))))
|
||||
(cond ((file-readable-p file)
|
||||
(load-file file))
|
||||
(t
|
||||
@ -2175,12 +2169,6 @@ If FILE is nil, try to load a default file. The default file names are
|
||||
(use-global-map global-map)
|
||||
(setq tpu-edt-mode nil))))
|
||||
|
||||
|
||||
;;;
|
||||
;;; Turn on TPU-edt and announce it as a feature
|
||||
;;;
|
||||
(tpu-edt-mode)
|
||||
|
||||
(provide 'tpu-edt)
|
||||
|
||||
;;; tpu-edt.el ends here
|
||||
|
Loading…
Reference in New Issue
Block a user