aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKarl Heuer1995-04-14 17:28:59 +0000
committerKarl Heuer1995-04-14 17:28:59 +0000
commite4360875a9d303033fed64d4582f5fe67f5425bb (patch)
tree093f2019721c236157459194a1ecb08bbed16059
parent29978f0b3f8a50040397b658616706f67ea726e7 (diff)
downloademacs-e4360875a9d303033fed64d4582f5fe67f5425bb.tar.gz
emacs-e4360875a9d303033fed64d4582f5fe67f5425bb.zip
Many doc fixes.
(edt-version): Deleted.
-rw-r--r--lisp/emulation/edt.el98
1 files changed, 47 insertions, 51 deletions
diff --git a/lisp/emulation/edt.el b/lisp/emulation/edt.el
index a0593a25022..1178bd2ea1c 100644
--- a/lisp/emulation/edt.el
+++ b/lisp/emulation/edt.el
@@ -4,7 +4,6 @@
4 4
5;; Author: Kevin Gallagher <kgallagh@spd.dsccc.com> 5;; Author: Kevin Gallagher <kgallagh@spd.dsccc.com>
6;; Maintainer: Kevin Gallagher <kgallagh@spd.dsccc.com> 6;; Maintainer: Kevin Gallagher <kgallagh@spd.dsccc.com>
7;; Version: 3.0.3
8;; Keywords: emulations 7;; Keywords: emulations
9 8
10;; This file is part of GNU Emacs. 9;; This file is part of GNU Emacs.
@@ -25,7 +24,7 @@
25 24
26;;; Usage: 25;;; Usage:
27 26
28;; See edt-user.doc 27;; See edt-user.doc in the Emacs etc directory.
29 28
30;; ==================================================================== 29;; ====================================================================
31 30
@@ -38,8 +37,6 @@
38;;;; VARIABLES and CONSTANTS 37;;;; VARIABLES and CONSTANTS
39;;;; 38;;;;
40 39
41(defconst edt-version "3.0.3" "EDT version number.")
42
43(defvar edt-last-deleted-lines "" 40(defvar edt-last-deleted-lines ""
44 "Last text deleted by an EDT emulation line delete command.") 41 "Last text deleted by an EDT emulation line delete command.")
45 42
@@ -53,44 +50,44 @@
53 "Key definition replaced with edt-define-key or edt-learn command.") 50 "Key definition replaced with edt-define-key or edt-learn command.")
54 51
55(defvar edt-direction-string "" 52(defvar edt-direction-string ""
56 "Current direction of movement.") 53 "String indicating current direction of movement.")
57 54
58(defvar edt-select-mode nil 55(defvar edt-select-mode nil
59 "Select minor mode.") 56 "Non-nil means select mode is active.")
60 57
61(defvar edt-select-mode-text "" 58(defvar edt-select-mode-text ""
62 "Select mode active text.") 59 "Text displayed in mode line when select mode is active.")
63 60
64(defconst edt-select-mode-string " Select" 61(defconst edt-select-mode-string " Select"
65 "String used to indicated select mode is active.") 62 "String to indicate select mode is active.")
66 63
67(defconst edt-forward-string " ADVANCE" 64(defconst edt-forward-string " ADVANCE"
68 "Direction string indicating forward movement.") 65 "Direction string in mode line to indicate forward movement.")
69 66
70(defconst edt-backward-string " BACKUP" 67(defconst edt-backward-string " BACKUP"
71 "Direction string indicating backward movement.") 68 "Direction string in mode line to indicate backward movement.")
72 69
73(defvar edt-default-map-active nil 70(defvar edt-default-map-active nil
74 "Indicates, when true, that default EDT emulation key bindings are active; 71 "Non-nil indicates that default EDT emulation key bindings are active.
75user-defined custom bindings are active when set to nil.") 72Nil means user-defined custom bindings are active.")
76 73
77(defvar edt-user-map-configured nil 74(defvar edt-user-map-configured nil
78 "Indicates, when true, that user custom EDT emulation key bindings are 75 "Non-nil indicates that user custom EDT key bindings are configured.
79configured and available for use.") 76This means that an edt-user.el file was found in the user's load-path.")
80 77
81(defvar edt-keep-current-page-delimiter nil 78(defvar edt-keep-current-page-delimiter nil
82 "If set to true, when edt-emulation-on is first invoked, 79 "Non-nil leaves current value of page-delimiter unchanged.
83modification of the page-delimiter varible to \"\\f\" is suppressed, 80Nil causes the page-delimiter variable to be set to to \"\\f\"
84thereby retaining current Emacs setting.") 81when edt-emulation-on is first invoked. Original value is restored
82when edt-emulation-off is called.")
85 83
86(defvar edt-use-EDT-control-key-bindings nil 84(defvar edt-use-EDT-control-key-bindings nil
87 "If set to true, EDT control key bindings are defined. 85 "Non-nil causes the control key bindings to be replaced with EDT bindings.
88When true, many standard Emacs control key bindings are overwritten. 86Nil (the default) means EDT control key bindings are not used and the current
89If set to nil (the default), EDT control key bindings are not used. 87control key bindings are retained for use in the EDT emulation.")
90Instead, the standard Emacs control key bindings are retained.")
91 88
92(defvar edt-word-entities '(?\t) 89(defvar edt-word-entities '(?\t)
93 "*Specifies the list of word entity characters.") 90 "*Specifies the list of EDT word entity characters.")
94 91
95;;; 92;;;
96;;; Emacs version identifiers - currently referenced by 93;;; Emacs version identifiers - currently referenced by
@@ -98,14 +95,14 @@ Instead, the standard Emacs control key bindings are retained.")
98;;; o edt-emulation-on o edt-load-xkeys 95;;; o edt-emulation-on o edt-load-xkeys
99;;; 96;;;
100(defconst edt-emacs19-p (not (string-lessp emacs-version "19")) 97(defconst edt-emacs19-p (not (string-lessp emacs-version "19"))
101 "Non-NIL if we are running Lucid or GNU Emacs version 19.") 98 "Non-nil if we are running Lucid or GNU Emacs version 19.")
102 99
103(defconst edt-lucid-emacs19-p 100(defconst edt-lucid-emacs19-p
104 (and edt-emacs19-p (string-match "Lucid" emacs-version)) 101 (and edt-emacs19-p (string-match "Lucid" emacs-version))
105 "Non-NIL if we are running Lucid Emacs version 19.") 102 "Non-nil if we are running Lucid Emacs version 19.")
106 103
107(defconst edt-gnu-emacs19-p (and edt-emacs19-p (not edt-lucid-emacs19-p)) 104(defconst edt-gnu-emacs19-p (and edt-emacs19-p (not edt-lucid-emacs19-p))
108 "Non-NIL if we are running GNU Emacs version 19.") 105 "Non-nil if we are running GNU Emacs version 19.")
109 106
110(defvar edt-xkeys-file nil 107(defvar edt-xkeys-file nil
111 "File mapping X function keys to LK-201 keyboard function and keypad keys.") 108 "File mapping X function keys to LK-201 keyboard function and keypad keys.")
@@ -402,7 +399,7 @@ Accepts a positive prefix argument for the number of BOL marks to move."
402;;; 399;;;
403 400
404(defun edt-find-forward (&optional find) 401(defun edt-find-forward (&optional find)
405 "Find first occurance of a string in the forward direction and save the string." 402 "Find first occurance of a string in forward direction and save it."
406 (interactive) 403 (interactive)
407 (if (not find) 404 (if (not find)
408 (set 'search-last-string (read-string "Search forward: "))) 405 (set 'search-last-string (read-string "Search forward: ")))
@@ -410,14 +407,14 @@ Accepts a positive prefix argument for the number of BOL marks to move."
410 (search-backward search-last-string))) 407 (search-backward search-last-string)))
411 408
412(defun edt-find-backward (&optional find) 409(defun edt-find-backward (&optional find)
413 "Find first occurance of a string in the backward direction and save the string." 410 "Find first occurance of a string in the backward direction and save it."
414 (interactive) 411 (interactive)
415 (if (not find) 412 (if (not find)
416 (set 'search-last-string (read-string "Search backward: "))) 413 (set 'search-last-string (read-string "Search backward: ")))
417 (search-backward search-last-string)) 414 (search-backward search-last-string))
418 415
419(defun edt-find () 416(defun edt-find ()
420 "Find first occurance of string in current direction and save the string." 417 "Find first occurance of string in current direction and save it."
421 (interactive) 418 (interactive)
422 (set 'search-last-string (read-string "Search: ")) 419 (set 'search-last-string (read-string "Search: "))
423 (if (equal edt-direction-string edt-forward-string) 420 (if (equal edt-direction-string edt-forward-string)
@@ -503,7 +500,7 @@ Accepts a positive prefix argument for the number of lines to delete."
503;;; 500;;;
504 501
505(defun edt-select-mode (arg) 502(defun edt-select-mode (arg)
506 "Turn EDT select mode off if arg is nil; otherwise, turn EDT select mode on. 503 "Turn EDT select mode off if ARG is nil; otherwise, turn EDT select mode on.
507In select mode, selected text is highlighted." 504In select mode, selected text is highlighted."
508 (if arg 505 (if arg
509 (progn 506 (progn
@@ -540,7 +537,7 @@ In select mode, selected text is highlighted."
540;;; 537;;;
541 538
542(defun edt-delete-to-beginning-of-line (num) 539(defun edt-delete-to-beginning-of-line (num)
543 "Delete from cursor to beginning of of line. 540 "Delete from cursor to beginning of line.
544Accepts a positive prefix argument for the number of lines to delete." 541Accepts a positive prefix argument for the number of lines to delete."
545 (interactive "*p") 542 (interactive "*p")
546 (edt-check-prefix num) 543 (edt-check-prefix num)
@@ -620,7 +617,7 @@ Accepts a positive prefix argument for the number of characters to delete."
620;;; 617;;;
621 618
622(defun edt-undelete-word () 619(defun edt-undelete-word ()
623 "Yank words deleted by last EDT word-deletion command." 620 "Undelete previous deleted word(s)."
624 (interactive "*") 621 (interactive "*")
625 (point-to-register 1) 622 (point-to-register 1)
626 (insert edt-last-deleted-words) 623 (insert edt-last-deleted-words)
@@ -631,7 +628,7 @@ Accepts a positive prefix argument for the number of characters to delete."
631;;; 628;;;
632 629
633(defun edt-undelete-character () 630(defun edt-undelete-character ()
634 "Yank characters deleted by last EDT character-deletion command." 631 "Undelete previous deleted character(s)."
635 (interactive "*") 632 (interactive "*")
636 (point-to-register 1) 633 (point-to-register 1)
637 (insert edt-last-deleted-chars) 634 (insert edt-last-deleted-chars)
@@ -655,7 +652,8 @@ Accepts a positive prefix argument for the number of characters to delete."
655;;; 652;;;
656 653
657(defun edt-advance () 654(defun edt-advance ()
658 "Set movement direction forward." 655 "Set movement direction forward.
656Also, execute command specified if in Minibuffer."
659 (interactive) 657 (interactive)
660 (setq edt-direction-string edt-forward-string) 658 (setq edt-direction-string edt-forward-string)
661 (edt-update-mode-line) 659 (edt-update-mode-line)
@@ -668,7 +666,8 @@ Accepts a positive prefix argument for the number of characters to delete."
668;;; 666;;;
669 667
670(defun edt-backup () 668(defun edt-backup ()
671 "Set movement direction backward." 669 "Set movement direction backward.
670Also, execute command specified if in Minibuffer."
672 (interactive) 671 (interactive)
673 (setq edt-direction-string edt-backward-string) 672 (setq edt-direction-string edt-backward-string)
674 (edt-update-mode-line) 673 (edt-update-mode-line)
@@ -791,13 +790,6 @@ Accepts a positive prefix argument for the number of tabs to insert."
791;;; provided here. Some of these have been motivated by similar 790;;; provided here. Some of these have been motivated by similar
792;;; TPU/EVE and EVE-Plus commands. Others are new. 791;;; TPU/EVE and EVE-Plus commands. Others are new.
793 792
794(defun edt-version nil
795 "Print the EDT version number."
796 (interactive)
797 (message
798 "EDT version %s by Kevin Gallagher (kgallagh@spd.dsccc.com)"
799 edt-version))
800
801;;; 793;;;
802;;; CHANGE DIRECTION 794;;; CHANGE DIRECTION
803;;; 795;;;
@@ -895,8 +887,8 @@ Accepts a positive prefix argument for the number of paragraph to move."
895;;; 887;;;
896 888
897(defun edt-restore-key () 889(defun edt-restore-key ()
898 "Restore last replaced key definition, which is stored in 890 "Restore last replaced key definition.
899edt-last-replaced-key-definition." 891Definition is stored in edt-last-replaced-key-definition."
900 (interactive) 892 (interactive)
901 (if edt-last-replaced-key-definition 893 (if edt-last-replaced-key-definition
902 (progn 894 (progn
@@ -936,12 +928,12 @@ edt-last-replaced-key-definition."
936;;; 928;;;
937 929
938(defun edt-scroll-window-forward-line () 930(defun edt-scroll-window-forward-line ()
939 "Move window forward one line leaving cursor at relative position in window." 931 "Move window forward one line leaving cursor at position in window."
940 (interactive) 932 (interactive)
941 (scroll-up 1)) 933 (scroll-up 1))
942 934
943(defun edt-scroll-window-backward-line () 935(defun edt-scroll-window-backward-line ()
944 "Move window backward one line leaving cursor at relative position in window." 936 "Move window backward one line leaving cursor at position in window."
945 (interactive) 937 (interactive)
946 (scroll-down 1)) 938 (scroll-down 1))
947 939
@@ -1286,8 +1278,9 @@ Accepts a positive prefix argument for the number times to duplicate the line."
1286;;; 1278;;;
1287 1279
1288(defun edt-cut-rectangle-overstrike-mode () 1280(defun edt-cut-rectangle-overstrike-mode ()
1289 "Cut a rectangle of text between mark and cursor to register, replacing 1281 "Cut a rectangle of text between mark and cursor to register.
1290characters with spaces and moving cursor back to upper left corner." 1282Replace cut characters with spaces and moving cursor back to
1283upper left corner."
1291 (interactive "*") 1284 (interactive "*")
1292 (edt-check-selection) 1285 (edt-check-selection)
1293 (setq edt-rect-start-point (region-beginning)) 1286 (setq edt-rect-start-point (region-beginning))
@@ -1296,8 +1289,8 @@ characters with spaces and moving cursor back to upper left corner."
1296 (message "Selected rectangle CUT to register")) 1289 (message "Selected rectangle CUT to register"))
1297 1290
1298(defun edt-cut-rectangle-insert-mode () 1291(defun edt-cut-rectangle-insert-mode ()
1299 "Cut a rectangle of text between mark and cursor to register, deleting 1292 "Cut a rectangle of text between mark and cursor to register.
1300intermediate text and moving cursor back to upper left corner." 1293Move cursor back to upper left corner."
1301 (interactive "*") 1294 (interactive "*")
1302 (edt-check-selection) 1295 (edt-check-selection)
1303 (setq edt-rect-start-point (region-beginning)) 1296 (setq edt-rect-start-point (region-beginning))
@@ -1308,7 +1301,7 @@ intermediate text and moving cursor back to upper left corner."
1308 1301
1309(defun edt-cut-rectangle () 1302(defun edt-cut-rectangle ()
1310 "Cut a rectangular region of text to register. 1303 "Cut a rectangular region of text to register.
1311If overwrite mode is active, cut text is replace with whitespace." 1304If overwrite mode is active, cut text is replaced with whitespace."
1312 (interactive "*") 1305 (interactive "*")
1313 (if overwrite-mode 1306 (if overwrite-mode
1314 (edt-cut-rectangle-overstrike-mode) 1307 (edt-cut-rectangle-overstrike-mode)
@@ -1416,7 +1409,8 @@ and the cursor is left to rest at the beginning of that word."
1416;;; 1409;;;
1417;;; Emacs version 19 X-windows key definition support 1410;;; Emacs version 19 X-windows key definition support
1418;;; 1411;;;
1419(defvar edt-last-answer nil "Most recent response to edt-y-or-n-p.") 1412(defvar edt-last-answer nil
1413 "Most recent response to edt-y-or-n-p.")
1420 1414
1421(defun edt-y-or-n-p (prompt &optional not-yes) 1415(defun edt-y-or-n-p (prompt &optional not-yes)
1422 "Prompt for a y or n answer with positive default. 1416 "Prompt for a y or n answer with positive default.
@@ -1993,10 +1987,12 @@ G-C-\\: Split Window | FNDNXT | Yank | CUT |
1993 (with-electric-help 'delete-other-windows name t)))) 1987 (with-electric-help 'delete-other-windows name t))))
1994 1988
1995(defun edt-electric-keypad-help () 1989(defun edt-electric-keypad-help ()
1990 "Display default EDT bindings."
1996 (interactive) 1991 (interactive)
1997 (edt-electric-helpify 'edt-keypad-help)) 1992 (edt-electric-helpify 'edt-keypad-help))
1998 1993
1999(defun edt-electric-user-keypad-help () 1994(defun edt-electric-user-keypad-help ()
1995 "Display user custom EDT bindings."
2000 (interactive) 1996 (interactive)
2001 (edt-electric-helpify 'edt-user-keypad-help)) 1997 (edt-electric-helpify 'edt-user-keypad-help))
2002 1998