X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/be520aca79dd429d55012a1916bdc97f06773fc5..f1e6674bb32058c7ef683d5f8f8ac67f99e96dd2:/lisp/emulation/edt.el diff --git a/lisp/emulation/edt.el b/lisp/emulation/edt.el index 68550cc30e..11a1c7f03b 100644 --- a/lisp/emulation/edt.el +++ b/lisp/emulation/edt.el @@ -1,6 +1,7 @@ ;;; edt.el --- enhanced EDT keypad mode emulation for GNU Emacs -;; Copyright (C) 1986, 1992-1995, 2000-2011 Free Software Foundation, Inc. +;; Copyright (C) 1986, 1992-1995, 2000-2013 Free Software Foundation, +;; Inc. ;; Author: Kevin Gallagher ;; Maintainer: Kevin Gallagher @@ -48,7 +49,7 @@ ;; 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) @@ -75,7 +76,7 @@ ;; 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%") @@ -363,7 +364,7 @@ This means that an edt-user.el file was found in the user's `load-path'.") ;;; ;;; (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. @@ -1961,14 +1962,14 @@ created." 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 @@ -2071,6 +2072,20 @@ created." (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 @@ -2110,10 +2125,8 @@ 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." @@ -2134,7 +2147,9 @@ Optional argument USER-SETUP non-nil means called from function ;; 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." @@ -2362,7 +2377,7 @@ Argument GOLD-BINDING is the Emacs function to be bound to GOLD ." (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) @@ -2484,7 +2499,7 @@ Argument GOLD-BINDING is the Emacs function to be bound to GOLD ." 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 |