/[emacs]/emacs/lisp/emulation/edt.el
ViewVC logotype

Diff of /emacs/lisp/emulation/edt.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.42 by rost, Tue Nov 12 01:41:25 2002 UTC revision 1.43 by lektu, Tue Feb 4 12:56:02 2003 UTC
# Line 27  Line 27 
27    
28    
29  ;;; Commentary:  ;;; Commentary:
30  ;;  ;;
31    
32  ;; This is Version 4.0 of the EDT Emulation for Emacs 19 and above.  ;; This is Version 4.0 of the EDT Emulation for Emacs 19 and above.
33  ;; It comes with special functions which replicate nearly all of EDT's  ;; It comes with special functions which replicate nearly all of EDT's
# Line 41  Line 41 
41    
42  ;; Getting Started:  ;; Getting Started:
43    
44  ;; To start the EDT Emulation, first start Emacs and then enter  ;; To start the EDT Emulation, first start Emacs and then enter
45  ;;  ;;
46  ;;    M-x edt-emulation-on  ;;    M-x edt-emulation-on
47  ;;      ;;
48  ;; to begin the emulation.  After initialization is complete, the  ;; to begin the emulation.  After initialization is complete, the
49  ;; following message will appear below the status line informing you  ;; following message will appear below the status line informing you
50  ;; that the emulation has been enabled: "Default EDT keymap active".  ;; that the emulation has been enabled: "Default EDT keymap active".
# Line 59  Line 59 
59  ;; Emacs "etc" directory.  It contains very helpful user information.  ;; Emacs "etc" directory.  It contains very helpful user information.
60    
61  ;; The EDT emulation consists of the following files:  ;; The EDT emulation consists of the following files:
62  ;;  ;;
63  ;; edt-user.doc     - User Instructions and Sample Customization File  ;; edt-user.doc     - User Instructions and Sample Customization File
64  ;; edt.el           - EDT Emulation Functions and Default Configuration  ;; edt.el           - EDT Emulation Functions and Default Configuration
65  ;; edt-lk201.el     - Built-in support for DEC LK-201 Keyboards  ;; edt-lk201.el     - Built-in support for DEC LK-201 Keyboards
66  ;; edt-vt100.el     - Built-in support for DEC VT-100 (and above) terminals  ;; edt-vt100.el     - Built-in support for DEC VT-100 (and above) terminals
67  ;; edt-pc.el        - Built-in support for PC 101 Keyboards under MS-DOS  ;; edt-pc.el        - Built-in support for PC 101 Keyboards under MS-DOS
68  ;; edt-mapper.el    - Create an EDT LK-201 Map File for Keyboards Without  ;; edt-mapper.el    - Create an EDT LK-201 Map File for Keyboards Without
69  ;;                      Built-in Support  ;;                      Built-in Support
70    
71  ;; Enhancements:  ;; Enhancements:
# Line 81  Line 81 
81  ;;      following line  ;;      following line
82  ;;  ;;
83  ;;           (edt-set-scroll-margins "20%" "25%")  ;;           (edt-set-scroll-margins "20%" "25%")
84  ;;        ;;
85  ;;      sets the top margin to 20% of the window and the bottom margin  ;;      sets the top margin to 20% of the window and the bottom margin
86  ;;      to 25% of the window.  To disable this feature, set each  ;;      to 25% of the window.  To disable this feature, set each
87  ;;      margin to 0%.  You can also invoke edt-set-scroll-margins  ;;      margin to 0%.  You can also invoke edt-set-scroll-margins
# Line 91  Line 91 
91  ;;      NOTE: Another way to set the scroll margins is to use the  ;;      NOTE: Another way to set the scroll margins is to use the
92  ;;      Emacs customization feature (not available in Emacs 19) to set  ;;      Emacs customization feature (not available in Emacs 19) to set
93  ;;      the following two variables directly:  ;;      the following two variables directly:
94  ;;        ;;
95  ;;           edt-top-scroll-margin and edt-bottom-scroll-margin  ;;           edt-top-scroll-margin and edt-bottom-scroll-margin
96  ;;  ;;
97  ;;      Enter the Emacs `customize' command.  First select the Editing  ;;      Enter the Emacs `customize' command.  First select the Editing
98  ;;      group and then select the Emulations group.  Finally, select  ;;      group and then select the Emulations group.  Finally, select
99  ;;      the Edt group and follow the directions.  ;;      the Edt group and follow the directions.
100  ;;        ;;
101  ;;  2.  The SUBS command is now supported and bound to GOLD-Enter by  ;;  2.  The SUBS command is now supported and bound to GOLD-Enter by
102  ;;      default.  (This design was copied from tpu-edt.el.)  Note, in  ;;      default.  (This design was copied from tpu-edt.el.)  Note, in
103  ;;      earlier versions of EDT Emulation, GOLD-Enter was assigned to  ;;      earlier versions of EDT Emulation, GOLD-Enter was assigned to
# Line 149  Line 149 
149    
150    
151  ;;; History:  ;;; History:
152  ;;  ;;
153  ;;  Version 4.0    2000    Added New Features and Fixed a Few Bugs  ;;  Version 4.0    2000    Added New Features and Fixed a Few Bugs
154  ;;    ;;
155    
156    
157  ;;; Code:  ;;; Code:
# Line 198  setting replicates EDT's page delimiter Line 198  setting replicates EDT's page delimiter
198  is restored when edt-emulation-off is called."  is restored when edt-emulation-off is called."
199    :type 'boolean    :type 'boolean
200    :group 'edt)    :group 'edt)
201          
202  (defcustom edt-use-EDT-control-key-bindings nil  (defcustom edt-use-EDT-control-key-bindings nil
203    "*Emacs MUST be restarted for a change in value to take effect!    "*Emacs MUST be restarted for a change in value to take effect!
204  Non-nil causes the control key bindings to be replaced with EDT  Non-nil causes the control key bindings to be replaced with EDT
# Line 209  use within the EDT emulation." Line 209  use within the EDT emulation."
209    :group 'edt)    :group 'edt)
210    
211  (defcustom edt-word-entities '(?\t)  (defcustom edt-word-entities '(?\t)
212    "*Specifies the list of EDT word entity characters.      "*Specifies the list of EDT word entity characters.
213  The default list, (\?\\t), contains just the TAB character, which  The default list, (\?\\t), contains just the TAB character, which
214  emulates EDT.  Characters are specified in the list using their  emulates EDT.  Characters are specified in the list using their
215  decimal ASCII values.  A question mark, followed by the actual  decimal ASCII values.  A question mark, followed by the actual
# Line 402  Argument NUM is the number of page delim Line 402  Argument NUM is the number of page delim
402  ;;; EDT defaults a section size to be 16 lines of its one and only  ;;; EDT defaults a section size to be 16 lines of its one and only
403  ;;; 24-line window.  That's two-thirds of the window at a time.  The  ;;; 24-line window.  That's two-thirds of the window at a time.  The
404  ;;; EDT SECT commands moves the cursor, not the window.  ;;; EDT SECT commands moves the cursor, not the window.
405  ;;;  ;;;
406  ;;; This emulation of EDT's SECT moves the cursor approximately  ;;; This emulation of EDT's SECT moves the cursor approximately
407  ;;; two-thirds of the current window at a time.  ;;; two-thirds of the current window at a time.
408    
# Line 491  Argument NUM is the number of EOL marks Line 491  Argument NUM is the number of EOL marks
491  ;;; This one is a tad messy.  To emulate EDT's behavior everywhere in  ;;; This one is a tad messy.  To emulate EDT's behavior everywhere in
492  ;;; the file (beginning of file, end of file, beginning of line, end  ;;; the file (beginning of file, end of file, beginning of line, end
493  ;;; of line, etc.) it takes a bit of special handling.  ;;; of line, etc.) it takes a bit of special handling.
494  ;;;  ;;;
495  ;;; The variable edt-word-entities contains a list of characters which  ;;; The variable edt-word-entities contains a list of characters which
496  ;;; are to be viewed as distinct words where ever they appear in the  ;;; are to be viewed as distinct words where ever they appear in the
497  ;;; buffer.  This emulates the EDT line mode command SET ENTITY WORD.  ;;; buffer.  This emulates the EDT line mode command SET ENTITY WORD.
# Line 729  Optional argument FIND is t if this func Line 729  Optional argument FIND is t if this func
729    (if (equal edt-direction-string edt-forward-string)    (if (equal edt-direction-string edt-forward-string)
730        (edt-find-forward t)        (edt-find-forward t)
731        (edt-find-backward t)))        (edt-find-backward t)))
732      
733    
734  ;;;  ;;;
735  ;;; FNDNXT  ;;; FNDNXT
# Line 798  Optional argument FIND is t if this func Line 798  Optional argument FIND is t if this func
798    (if (equal edt-direction-string edt-forward-string)    (if (equal edt-direction-string edt-forward-string)
799        (edt-find-next-forward)        (edt-find-next-forward)
800      (edt-find-next-backward)))      (edt-find-next-backward)))
801      
802  ;;;  ;;;
803  ;;; APPEND  ;;; APPEND
804  ;;;  ;;;
# Line 1008  Argument NUM is the number of characters Line 1008  Argument NUM is the number of characters
1008  (defun edt-substitute (num)  (defun edt-substitute (num)
1009    "Replace the selected region with the contents of the CUT buffer and.    "Replace the selected region with the contents of the CUT buffer and.
1010  Repeat the most recent FIND command.  (The Emacs kill ring is used as  Repeat the most recent FIND command.  (The Emacs kill ring is used as
1011  the CUT buffer.)    the CUT buffer.)
1012  Argument NUM is the repeat count.  A positive value indicates the of times  Argument NUM is the repeat count.  A positive value indicates the of times
1013  to repeat the substitution.  A negative argument means replace all occurrences  to repeat the substitution.  A negative argument means replace all occurrences
1014  of the search text."  of the search text."
# Line 1087  Also, execute command specified if in Mi Line 1087  Also, execute command specified if in Mi
1087        (exit-minibuffer))        (exit-minibuffer))
1088    (if edt-x-emacs19-p (setq zmacs-region-stays t)))    (if edt-x-emacs19-p (setq zmacs-region-stays t)))
1089    
1090      
1091  ;;;  ;;;
1092  ;;; BACKUP  ;;; BACKUP
1093  ;;;  ;;;
# Line 1205  Argument NUM is the number of tabs to in Line 1205  Argument NUM is the number of tabs to in
1205  Argument NUM is the prefix value tested."  Argument NUM is the prefix value tested."
1206    (if (<= num 0)    (if (<= num 0)
1207        (error "Prefix must be positive")))        (error "Prefix must be positive")))
1208          
1209  ;;;  ;;;
1210  ;;; Check Selection  ;;; Check Selection
1211  ;;;  ;;;
# Line 1277  Argument BOTTOM is the bottom margin in Line 1277  Argument BOTTOM is the bottom margin in
1277  ;;;; ENHANCEMENTS AND ADDITIONS FOR EDT KEYPAD MODE  ;;;; ENHANCEMENTS AND ADDITIONS FOR EDT KEYPAD MODE
1278  ;;;;  ;;;;
1279    
1280  ;;;  ;;;
1281  ;;; Several enhancements and additions to EDT keypad mode commands are  ;;; Several enhancements and additions to EDT keypad mode commands are
1282  ;;; provided here.  Some of these have been motivated by similar  ;;; provided here.  Some of these have been motivated by similar
1283  ;;; TPU/EVE and EVE-Plus commands.  Others are new.  ;;; TPU/EVE and EVE-Plus commands.  Others are new.
# Line 1818  Argument NUM is the number of times to d Line 1818  Argument NUM is the number of times to d
1818    (save-buffer)    (save-buffer)
1819    (save-buffers-kill-emacs))    (save-buffers-kill-emacs))
1820    
1821  ;;;  ;;;
1822  ;;; QUIT  ;;; QUIT
1823  ;;;  ;;;
1824    
# Line 1836  Warn user that modifications will be los Line 1836  Warn user that modifications will be los
1836                  (kill-emacs)                  (kill-emacs)
1837                (setq working nil)))                (setq working nil)))
1838          (setq list (cdr list))))          (setq list (cdr list))))
1839      (if working (kill-emacs))))      (if working (kill-emacs))))
1840    
1841  ;;;  ;;;
1842  ;;; SPLIT WINDOW  ;;; SPLIT WINDOW
1843  ;;;  ;;;
1844    
# Line 2024  Optional argument NOT-YES changes the de Line 2024  Optional argument NOT-YES changes the de
2024  ;;;  Function used to load LK-201 key mapping file generated by edt-mapper.el.  ;;;  Function used to load LK-201 key mapping file generated by edt-mapper.el.
2025  ;;;  ;;;
2026  (defun edt-load-keys (file)  (defun edt-load-keys (file)
2027    "Load the LK-201 key mapping FILE generated by edt-mapper.el.      "Load the LK-201 key mapping FILE generated by edt-mapper.el.
2028  If FILE is nil, which is the normal case, try to load a default file.  If FILE is nil, which is the normal case, try to load a default file.
2029  The default file names are based upon the window system, terminal  The default file names are based upon the window system, terminal
2030  type, and version of Emacs in use: GNU Emacs or XEmacs (aka Lucid  type, and version of Emacs in use: GNU Emacs or XEmacs (aka Lucid
# Line 2042  created." Line 2042  created."
2042                   "~/.edt-" edt-emacs-variant                   "~/.edt-" edt-emacs-variant
2043                   (if edt-term (concat "-" edt-term))                   (if edt-term (concat "-" edt-term))
2044                   (if edt-xserver (concat "-" edt-xserver))                   (if edt-xserver (concat "-" edt-xserver))
2045                   (if edt-window-system                   (if edt-window-system
2046                       (concat "-" (upcase (symbol-name edt-window-system))))                       (concat "-" (upcase (symbol-name edt-window-system))))
2047                   "-keys")))))                   "-keys")))))
2048    (cond ((file-readable-p file)    (cond ((file-readable-p file)
# Line 2053  created." Line 2053  created."
2053           (insert "           (insert "
2054    
2055       Ack!!  You're running the Enhanced EDT Emulation without loading an       Ack!!  You're running the Enhanced EDT Emulation without loading an
2056       EDT key mapping file.  To create an EDT key mapping file, run the       EDT key mapping file.  To create an EDT key mapping file, run the
2057       edt-mapper.el program.  It is safest to run it from an Emacs loaded       edt-mapper.el program.  It is safest to run it from an Emacs loaded
2058       without any of your own customizations found in your .emacs file, etc.       without any of your own customizations found in your .emacs file, etc.
2059       The reason for this is that some user customizations confuse edt-mapper.       The reason for this is that some user customizations confuse edt-mapper.
# Line 2061  created." Line 2061  created."
2061       follows:       follows:
2062    
2063            emacs -q -l edt-mapper.el            emacs -q -l edt-mapper.el
2064        
2065       [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 .emacs file, and
2066       the search for edt-mapper.el is successful, you can try running it now.]       the search for edt-mapper.el is successful, you can try running it now.]
2067    
# Line 2412  Argument GOLD-BINDING is the Emacs funct Line 2412  Argument GOLD-BINDING is the Emacs funct
2412         'edt-key-not-assigned 'edt-key-not-assigned)         'edt-key-not-assigned 'edt-key-not-assigned)
2413    
2414    ;; Control key bindings:  Regular and GOLD    ;; Control key bindings:  Regular and GOLD
2415    ;;    ;;
2416    ;; Standard EDT control key bindings conflict with standard Emacs    ;; Standard EDT control key bindings conflict with standard Emacs
2417    ;; control key bindings.  Normally, the standard Emacs control key    ;; control key bindings.  Normally, the standard Emacs control key
2418    ;; bindings are left unchanged in the default EDT mode.  However, if    ;; bindings are left unchanged in the default EDT mode.  However, if
# Line 2578  Argument GOLD-BINDING is the Emacs funct Line 2578  Argument GOLD-BINDING is the Emacs funct
2578   G-F9: Paste Rect Insert          +----------+----------+----------+----------+   G-F9: Paste Rect Insert          +----------+----------+----------+----------+
2579    F10: Cut Rectangle    F10: Cut Rectangle
2580  G-F10: Paste Rectangle  G-F10: Paste Rectangle
2581    F11: ESC                          F11: ESC
2582    F12: Begining of Line           +----------+----------+----------+----------+    F12: Begining of Line           +----------+----------+----------+----------+
2583  G-F12: Delete Other Windows       |   GOLD   |   HELP   |  FNDNXT  |  DEL L   |  G-F12: Delete Other Windows       |   GOLD   |   HELP   |  FNDNXT  |  DEL L   |
2584    F13: Delete to Begin of Word    |   (PF1)  |   (PF2)  |   (PF3)  |  (PF4)   |    F13: Delete to Begin of Word    |   (PF1)  |   (PF2)  |   (PF3)  |  (PF4)   |
# Line 2600  G-C-k: Restore Key                |   WO Line 2600  G-C-k: Restore Key                |   WO
2600    C-t: Display the Time           |         (0)         |    (.)   |   SUBS   |    C-t: Display the Time           |         (0)         |    (.)   |   SUBS   |
2601    C-u: Delete to Begin of Line    |      Open Line      |   RESET  |          |    C-u: Delete to Begin of Line    |      Open Line      |   RESET  |          |
2602    C-v: Redraw Display             +---------------------+----------+----------+    C-v: Redraw Display             +---------------------+----------+----------+
2603    C-w: Set Screen Width 132          C-w: Set Screen Width 132
2604    C-z: Suspend Emacs                    +----------+----------+----------+    C-z: Suspend Emacs                    +----------+----------+----------+
2605  G-C-\\: Split Window                     |  FNDNXT  |   Yank   |   CUT    |  G-C-\\: Split Window                     |  FNDNXT  |   Yank   |   CUT    |
2606                                          |  (FIND)  | (INSERT) | (REMOVE) |                                          |  (FIND)  | (INSERT) | (REMOVE) |
# Line 2610  G-C-\\: Split Window Line 2610  G-C-\\: Split Window
2610    G-e: Exit                             | (SELECT) |(PREVIOUS)|  (NEXT)  |    G-e: Exit                             | (SELECT) |(PREVIOUS)|  (NEXT)  |
2611    G-f: Find File                        |          |          |          |    G-f: Find File                        |          |          |          |
2612    G-g: Find File Other Window           +----------+----------+----------+    G-g: Find File Other Window           +----------+----------+----------+
2613    G-h: Keypad Help                G-h: Keypad Help
2614    G-i: Insert File                    G-i: Insert File
2615    G-k: Toggle Capitalization Word    G-k: Toggle Capitalization Word
2616    G-l: Downcase Region                G-l: Downcase Region
2617    G-m: Save Some Buffers              G-m: Save Some Buffers
2618    G-n: Next Error                      G-n: Next Error
2619    G-o: Switch to Next Window    G-o: Switch to Next Window
2620    G-q: Quit                                                              G-q: Quit
2621    G-r: Revert File                                                        G-r: Revert File
2622    G-s: Save Buffer                                                        G-s: Save Buffer
2623    G-u: Upcase Region                                                      G-u: Upcase Region
2624    G-v: Find File Other Window                                            G-v: Find File Other Window
2625    G-w: Write file                                                      G-w: Write file
2626    G-y: EDT Emulation OFF              G-y: EDT Emulation OFF
2627    G-z: Switch to User EDT Key Bindings    G-z: Switch to User EDT Key Bindings
2628    G-1: Delete Other Windows          G-1: Delete Other Windows
2629    G-2: Split Window                  G-2: Split Window
2630    G-%: Go to Percentage              G-%: Go to Percentage
2631    G- : Undo  (GOLD Spacebar)          G- : Undo  (GOLD Spacebar)
2632    G-=: Go to Line                    G-=: Go to Line
2633    G-`: What line    G-`: What line
2634    G-/: Query-Replace"    G-/: Query-Replace"
2635    

Legend:
Removed from v.1.42  
changed lines
  Added in v.1.43

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26