Function: edt-emulation-on
edt-emulation-on is an autoloaded, interactive and byte-compiled
function defined in edt.el.gz.
Signature
(edt-emulation-on)
Documentation
Turn on EDT Emulation.
Probably introduced at or before Emacs version 18.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/emulation/edt.el.gz
;;;
;;; Turning the EDT Emulation on and off.
;;;
;;;###autoload
(defun edt-emulation-on ()
"Turn on EDT Emulation."
(interactive)
;; If using pc window system (MS-DOS), set terminal type to pc.
;; If not a window system, get terminal type.
(if (eq window-system 'pc)
(setq edt-term "pc")
(if (not window-system)
(setq edt-term (getenv "TERM"))))
;; Look for a terminal configuration file for this terminal type.
;; Otherwise, load the user's custom configuration file.
(if (or (not window-system) (memq window-system '(pc tty)))
(progn
;; Load terminal-specific configuration file, if it exists for this
;; terminal type. Note: All DEC VT series terminals are supported
;; by the same terminal configuration file: edt-vt100.el.
(if (string-equal "vt" (substring edt-term 0 (min (length edt-term) 2)))
(setq edt-term "vt100"))
(let ((term edt-term)
hyphend)
(while (and term
(not (load (concat "edt-" term) t t)))
;; Strip off last hyphen and what follows, then try again
(if (setq hyphend (string-match "[-_][^-_]+$" term))
(setq term (substring term 0 hyphend))
(setq term nil)))
;; If no terminal-specific configuration file exists, load user's
;; custom EDT terminal configuration file.
;; If this is a pc running MS-DOS, then custom configuration files
;; are not supported. So, if the file is missing, issue an error
;; message.
(if (null term)
(if (equal edt-term "pc")
(error "Unable to find EDT terminal specific file edt-pc.el")
(edt-load-keys nil))
(setq edt-term term))))
(edt-load-keys nil))
;; Make highlighting of selected text work properly for EDT commands.
(setq edt-orig-transient-mark-mode
(default-value 'transient-mark-mode))
(add-hook 'activate-mark-hook
(lambda ()
(edt-select-mode t)))
(add-hook 'deactivate-mark-hook
(lambda ()
(edt-select-mode nil)))
;; Load user's EDT custom key bindings file, if it exists.
;; Otherwise, use the default bindings.
(if (load "edt-user" t t)
(edt-user-emulation-setup)
(edt-default-emulation-setup)))