Function: edt-load-keys

edt-load-keys is an interactive and byte-compiled function defined in edt.el.gz.

Signature

(edt-load-keys FILE)

Documentation

Load the LK-201 key mapping FILE generated by edt-mapper.el.

If FILE is nil, which is the normal case, try to load a default file. The default file names are based upon the window system and terminal type. If a default file does not exist, ask user if one should be created.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/emulation/edt.el.gz
;;;
;;;  Function used to load LK-201 key mapping file generated by edt-mapper.el.
;;;
(defun edt-load-keys (file)
  "Load the LK-201 key mapping FILE generated by edt-mapper.el.
If FILE is nil, which is the normal case, try to load a default file.
The default file names are based upon the window system and terminal
type.  If a default file does not exist, ask user if one should be
created."
  (interactive "fKey definition file: ")
  (cond (file
	 (setq file (expand-file-name file)))
	(edt-keys-file
	 (setq file (expand-file-name edt-keys-file)))
	(t
	 (setq file
	       (expand-file-name
		(concat
                 "~/.edt-gnu"
		 (if edt-term (concat "-" edt-term))
		 (if edt-xserver (concat "-" edt-xserver))
                 (if window-system
                     (concat "-" (upcase (symbol-name window-system))))
		 "-keys")))))
  (cond ((file-readable-p file)
	 (load-file file))
	(t
	 (switch-to-buffer "*scratch*")
	 (erase-buffer)
	 (insert "

     Ack!!  You're running the Enhanced EDT Emulation without loading an
     EDT key mapping file.  To create an EDT key mapping file, run the
     edt-mapper program.  It is safest to run it from an Emacs loaded
     without any of your own customizations found in your init file, etc.
     The reason for this is that some user customizations confuse edt-mapper.
     You can do this by quitting Emacs and then invoking Emacs again as
     follows:

          emacs -q -l edt-mapper -f edt-mapper

     [NOTE:  If you do nothing out of the ordinary in your init file, and
     the search for edt-mapper is successful, you can try running it now.]

     The library edt-mapper includes these same directions on how to
     use it!  Perhaps it's lying around here someplace. \n     ")
         (let ((path (locate-library
                      "edt-mapper"
                      nil (append (list default-directory) load-path))))
           (if path
               (progn
                 (insert (format
                          "Ah yes, there it is, in \n\n       %s \n\n" path))
                 (if (edt-y-or-n-p "Do you want to run it now? ")
                     (progn
                       (load-file path)
                       (edt-mapper))
                   (error "EDT Emulation not configured")))
             (insert (substitute-command-keys
		      "Nope, I can't seem to find it.  :-(\n\n"))
             (sit-for 20)
             (error "EDT Emulation not configured"))))))