;;; edt.el --- enhanced EDT keypad mode emulation for GNU Emacs
-;; Copyright (C) 1986, 1992, 1993, 1994, 1995, 2000, 2001, 2002, 2003,
-;; 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011
-;; Free Software Foundation, Inc.
+;; Copyright (C) 1986, 1992-1995, 2000-2014 Free Software Foundation, Inc.
;; Author: Kevin Gallagher <Kevin.Gallagher@boeing.com>
;; Maintainer: Kevin Gallagher <Kevin.Gallagher@boeing.com>
;; You can have the EDT Emulation start up automatically, each time
;; you initiate a GNU Emacs session, by adding the following line to
-;; your .emacs file:
+;; your init file:
;;
-;; (add-hook term-setup-hook 'edt-emulation-on)
+;; (add-hook 'emacs-startup-hook 'edt-emulation-on)
;; IMPORTANT: Be sure to read the Info node `edt' for more details.
;; It contains very helpful user information.
;; default, this feature is enabled, with the top margin set to
;; 10% of the window and the bottom margin set to 15% of the
;; window. To change these settings, you can invoke the function
-;; edt-set-scroll-margins in your .emacs file. For example, the
+;; edt-set-scroll-margins in your init file. For example, the
;; following line
;;
;; (edt-set-scroll-margins "20%" "25%")
;;;
;;; (setq edt-keep-current-page-delimiter t)
;;;
-;;; in your .emacs file.
+;;; in your init file.
(defun edt-page-forward (num)
"Move forward to just after next page delimiter.
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 .emacs file, etc.
+ 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
- [NOTE: If you do nothing out of the ordinary in your .emacs file, and
+ [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
(setq transient-mark-mode edt-orig-transient-mark-mode))
(message "Original key bindings restored; EDT Emulation disabled"))
+(defun edt-default-menu-bar-update-buffers ()
+ ;; Update edt-default-global-map with latest copy of
+ ;; `global-buffers-menu-map' each time `menu-bar-update-buffers'
+ ;; updates global-map.
+ (define-key edt-default-global-map [menu-bar buffer]
+ (cons "Buffers" global-buffers-menu-map)))
+
+(defun edt-user-menu-bar-update-buffers ()
+ ;; We need to update edt-user-global-map with latest copy of
+ ;; `global-buffers-menu-map' each time `menu-bar-update-buffers'
+ ;; updates global-map.
+ (define-key edt-user-global-map [menu-bar buffer]
+ (cons "Buffers" global-buffers-menu-map)))
+
(defun edt-default-emulation-setup (&optional user-setup)
"Setup emulation of DEC's EDT editor.
Optional argument USER-SETUP non-nil means called from function
(progn
(fset 'edt-emulation-on (symbol-function 'edt-select-default-global-map))
(edt-select-default-global-map)))
- ;; We need to share `global-buffers-menu-map' with the saved global
- ;; keymap, because `menu-bar-update-buffers' directly changes it.
- (define-key (current-global-map) [menu-bar buffer]
- (cons "Buffers" global-buffers-menu-map)))
+ ;; Keep the menu bar Buffers menu up-to-date in edt-default-global-map.
+ (add-hook 'menu-bar-update-hook 'edt-default-menu-bar-update-buffers))
(defun edt-user-emulation-setup ()
"Setup user custom emulation of DEC's EDT editor."
;; See Info node `edt' for more details, and sample edt-user.el file.
(if (fboundp 'edt-setup-user-bindings)
(edt-setup-user-bindings))
- (edt-select-user-global-map))
+ (edt-select-user-global-map)
+ ;; Keep the menu bar Buffers menu up-to-date in edt-user-global-map.
+ (add-hook 'menu-bar-update-hook 'edt-user-menu-bar-update-buffers))
(defun edt-select-default-global-map()
"Select default EDT emulation key bindings."
(edt-bind-gold-key-default "\C-h" 'help-for-help); Just in case.
(edt-bind-gold-key-default [f1] 'help-for-help)
(edt-bind-gold-key-default [help] 'help-for-help)
- (edt-bind-gold-key-default "\C-\\" 'split-window-vertically)
+ (edt-bind-gold-key-default "\C-\\" 'split-window-below)
;; GOLD bindings for regular keys.
(edt-bind-gold-key-default "a" 'edt-key-not-assigned)
F10: Cut Rectangle
G-F10: Paste Rectangle
F11: ESC
- F12: Begining of Line +----------+----------+----------+----------+
+ F12: Beginning of Line +----------+----------+----------+----------+
G-F12: Delete Other Windows | GOLD | HELP | FNDNXT | DEL L |
F13: Delete to Begin of Word | (PF1) | (PF2) | (PF3) | (PF4) |
HELP: Keypad Help |Mark Wisel|Desc Funct| FIND | UND L |