diff options
author | Miles Bader <miles@gnu.org> | 2007-08-21 04:55:30 +0000 |
---|---|---|
committer | Miles Bader <miles@gnu.org> | 2007-08-21 04:55:30 +0000 |
commit | 1fb072d1dff954c21d4805196df62c8eeead301c (patch) | |
tree | da374db1a51e2a355b46f26a1c99e1ac5db5dca4 /lisp/emulation | |
parent | aaf34461ff5804e5cebe163b31e535da72e81d87 (diff) | |
parent | bdaf8a62d53cf8d5a0dc4f0dc530ecd6fc1f44fe (diff) | |
download | emacs-1fb072d1dff954c21d4805196df62c8eeead301c.tar.gz emacs-1fb072d1dff954c21d4805196df62c8eeead301c.tar.bz2 emacs-1fb072d1dff954c21d4805196df62c8eeead301c.zip |
Merge from emacs--devo--0
Patches applied:
* emacs--devo--0 (patch 852-856)
- Update from CVS
- Merge from emacs--rel--22
* emacs--rel--22 (patch 93-96)
- Update from CVS
- Merge from gnus--rel--5.10
* gnus--rel--5.10 (patch 245)
- Update from CVS
Revision: emacs@sv.gnu.org/emacs--multi-tty--0--patch-32
Diffstat (limited to 'lisp/emulation')
-rw-r--r-- | lisp/emulation/cua-base.el | 16 | ||||
-rw-r--r-- | lisp/emulation/tpu-edt.el | 461 | ||||
-rw-r--r-- | lisp/emulation/tpu-extras.el | 66 | ||||
-rw-r--r-- | lisp/emulation/viper-cmd.el | 32 | ||||
-rw-r--r-- | lisp/emulation/viper-ex.el | 2 | ||||
-rw-r--r-- | lisp/emulation/viper.el | 13 |
6 files changed, 303 insertions, 287 deletions
diff --git a/lisp/emulation/cua-base.el b/lisp/emulation/cua-base.el index 337be13e2e5..323cad15276 100644 --- a/lisp/emulation/cua-base.el +++ b/lisp/emulation/cua-base.el @@ -1601,22 +1601,6 @@ shifted movement key, set `cua-highlight-region-shift-only'." (interactive) (setq cua--debug (not cua--debug))) -;; Install run-time check for older versions of CUA-mode which does not -;; work with GNU Emacs version 22.1 and newer. -;; -;; Except for version 1.2, all of the 1.x and 2.x version of cua-mode -;; provided the `CUA-mode' feature. Since this is no longer true, -;; we can warn the user if the `CUA-mode' feature is ever provided. - -;;;###autoload (eval-after-load 'CUA-mode -;;;###autoload '(error (concat "\n\n" -;;;###autoload "CUA-mode is now part of the standard GNU Emacs distribution, so you may\n" -;;;###autoload "now enable CUA via the Options menu or by customizing option `cua-mode'.\n\n" -;;;###autoload "You have loaded an older version of CUA-mode which does\n" -;;;###autoload "not work correctly with this version of GNU Emacs.\n\n" -;;;###autoload (if user-init-file (concat -;;;###autoload "To correct this, remove the loading and customization of the\n" -;;;###autoload "old version from the " user-init-file " file.\n\n"))))) (provide 'cua) diff --git a/lisp/emulation/tpu-edt.el b/lisp/emulation/tpu-edt.el index 81187112a66..12e64940b06 100644 --- a/lisp/emulation/tpu-edt.el +++ b/lisp/emulation/tpu-edt.el @@ -322,176 +322,176 @@ ;; that term/*.el does its job to map the escape sequence to the right ;; key-symbol. - (define-key map [up] 'tpu-move-to-beginning) ; up-arrow - (define-key map [down] 'tpu-move-to-end) ; down-arrow - (define-key map [right] 'end-of-line) ; right-arrow - (define-key map [left] 'beginning-of-line) ; left-arrow - - (define-key map [find] 'nil) ; Find - (define-key map [insert] 'nil) ; Insert Here - (define-key map [delete] 'tpu-store-text) ; Remove - (define-key map [select] 'tpu-unselect) ; Select - (define-key map [prior] 'tpu-previous-window) ; Prev Screen - (define-key map [next] 'tpu-next-window) ; Next Screen - - (define-key map [f1] 'nil) ; F1 - (define-key map [f2] 'nil) ; F2 - (define-key map [f3] 'nil) ; F3 - (define-key map [f4] 'nil) ; F4 - (define-key map [f5] 'nil) ; F5 - (define-key map [f6] 'nil) ; F6 - (define-key map [f7] 'nil) ; F7 - (define-key map [f8] 'nil) ; F8 - (define-key map [f9] 'nil) ; F9 - (define-key map [f10] 'nil) ; F10 - (define-key map [f11] 'nil) ; F11 - (define-key map [f12] 'nil) ; F12 - (define-key map [f13] 'nil) ; F13 - (define-key map [f14] 'nil) ; F14 - (define-key map [help] 'describe-bindings) ; HELP - (define-key map [menu] 'nil) ; DO - (define-key map [f17] 'tpu-drop-breadcrumb) ; F17 - (define-key map [f18] 'nil) ; F18 - (define-key map [f19] 'nil) ; F19 - (define-key map [f20] 'nil) ; F20 - - (define-key map [kp-f1] 'keyboard-quit) ; PF1 - (define-key map [kp-f2] 'help-for-help) ; PF2 - (define-key map [kp-f3] 'tpu-search) ; PF3 - (define-key map [kp-f4] 'tpu-undelete-lines) ; PF4 - (define-key map [kp-0] 'open-line) ; KP0 - (define-key map [kp-1] 'tpu-change-case) ; KP1 - (define-key map [kp-2] 'tpu-delete-to-eol) ; KP2 - (define-key map [kp-3] 'tpu-special-insert) ; KP3 - (define-key map [kp-4] 'tpu-move-to-end) ; KP4 - (define-key map [kp-5] 'tpu-move-to-beginning) ; KP5 - (define-key map [kp-6] 'tpu-paste) ; KP6 - (define-key map [kp-7] 'execute-extended-command) ; KP7 - (define-key map [kp-8] 'tpu-fill) ; KP8 - (define-key map [kp-9] 'tpu-replace) ; KP9 - (define-key map [kp-subtract] 'tpu-undelete-words) ; KP- - (define-key map [kp-separator] 'tpu-undelete-char) ; KP, - (define-key map [kp-decimal] 'tpu-unselect) ; KP. - (define-key map [kp-enter] 'tpu-substitute) ; KPenter + (define-key map [up] 'tpu-move-to-beginning) ; up-arrow + (define-key map [down] 'tpu-move-to-end) ; down-arrow + (define-key map [right] 'end-of-line) ; right-arrow + (define-key map [left] 'beginning-of-line) ; left-arrow + + ;; (define-key map [find] nil) ; Find + ;; (define-key map [insert] nil) ; Insert Here + (define-key map [delete] 'tpu-store-text) ; Remove + (define-key map [select] 'tpu-unselect) ; Select + (define-key map [prior] 'tpu-previous-window) ; Prev Screen + (define-key map [next] 'tpu-next-window) ; Next Screen + + ;; (define-key map [f1] nil) ; F1 + ;; (define-key map [f2] nil) ; F2 + ;; (define-key map [f3] nil) ; F3 + ;; (define-key map [f4] nil) ; F4 + ;; (define-key map [f5] nil) ; F5 + ;; (define-key map [f6] nil) ; F6 + ;; (define-key map [f7] nil) ; F7 + ;; (define-key map [f8] nil) ; F8 + ;; (define-key map [f9] nil) ; F9 + ;; (define-key map [f10] nil) ; F10 + ;; (define-key map [f11] nil) ; F11 + ;; (define-key map [f12] nil) ; F12 + ;; (define-key map [f13] nil) ; F13 + ;; (define-key map [f14] nil) ; F14 + (define-key map [help] 'describe-bindings) ; HELP + ;; (define-key map [menu] nil) ; DO + (define-key map [f17] 'tpu-drop-breadcrumb) ; F17 + ;; (define-key map [f18] nil) ; F18 + ;; (define-key map [f19] nil) ; F19 + ;; (define-key map [f20] nil) ; F20 + + (define-key map [kp-f1] 'keyboard-quit) ; PF1 + (define-key map [kp-f2] 'help-for-help) ; PF2 + (define-key map [kp-f3] 'tpu-search) ; PF3 + (define-key map [kp-f4] 'tpu-undelete-lines) ; PF4 + (define-key map [kp-0] 'open-line) ; KP0 + (define-key map [kp-1] 'tpu-change-case) ; KP1 + (define-key map [kp-2] 'tpu-delete-to-eol) ; KP2 + (define-key map [kp-3] 'tpu-special-insert) ; KP3 + (define-key map [kp-4] 'tpu-move-to-end) ; KP4 + (define-key map [kp-5] 'tpu-move-to-beginning) ; KP5 + (define-key map [kp-6] 'tpu-paste) ; KP6 + (define-key map [kp-7] 'execute-extended-command) ; KP7 + (define-key map [kp-8] 'tpu-fill) ; KP8 + (define-key map [kp-9] 'tpu-replace) ; KP9 + (define-key map [kp-subtract] 'tpu-undelete-words) ; KP- + (define-key map [kp-separator] 'tpu-undelete-char) ; KP, + (define-key map [kp-decimal] 'tpu-unselect) ; KP. + (define-key map [kp-enter] 'tpu-substitute) ; KPenter ;; - (define-key map "\C-A" 'tpu-toggle-overwrite-mode) ; ^A - (define-key map "\C-B" 'nil) ; ^B - (define-key map "\C-C" 'nil) ; ^C - (define-key map "\C-D" 'nil) ; ^D - (define-key map "\C-E" 'nil) ; ^E - (define-key map "\C-F" 'set-visited-file-name) ; ^F - (define-key map "\C-g" 'keyboard-quit) ; safety first - (define-key map "\C-h" 'delete-other-windows) ; BS - (define-key map "\C-i" 'other-window) ; TAB - (define-key map "\C-J" 'nil) ; ^J - (define-key map "\C-K" 'tpu-define-macro-key) ; ^K - (define-key map "\C-l" 'downcase-region) ; ^L - (define-key map "\C-M" 'nil) ; ^M - (define-key map "\C-N" 'nil) ; ^N - (define-key map "\C-O" 'nil) ; ^O - (define-key map "\C-P" 'nil) ; ^P - (define-key map "\C-Q" 'nil) ; ^Q - (define-key map "\C-R" 'nil) ; ^R - (define-key map "\C-S" 'nil) ; ^S - (define-key map "\C-T" 'tpu-toggle-control-keys) ; ^T - (define-key map "\C-u" 'upcase-region) ; ^U - (define-key map "\C-V" 'nil) ; ^V - (define-key map "\C-w" 'tpu-write-current-buffers) ; ^W - (define-key map "\C-X" 'nil) ; ^X - (define-key map "\C-Y" 'nil) ; ^Y - (define-key map "\C-Z" 'nil) ; ^Z - (define-key map " " 'undo) ; SPC - (define-key map "!" 'nil) ; ! - (define-key map "#" 'nil) ; # - (define-key map "$" 'tpu-add-at-eol) ; $ - (define-key map "%" 'tpu-goto-percent) ; % - (define-key map "&" 'nil) ; & - (define-key map "(" 'nil) ; ( - (define-key map ")" 'nil) ; ) - (define-key map "*" 'tpu-toggle-regexp) ; * - (define-key map "+" 'nil) ; + - (define-key map "," 'tpu-goto-breadcrumb) ; , - (define-key map "-" 'negative-argument) ; - - (define-key map "." 'tpu-drop-breadcrumb) ; . - (define-key map "/" 'tpu-emacs-replace) ; / - (define-key map "0" 'digit-argument) ; 0 - (define-key map "1" 'digit-argument) ; 1 - (define-key map "2" 'digit-argument) ; 2 - (define-key map "3" 'digit-argument) ; 3 - (define-key map "4" 'digit-argument) ; 4 - (define-key map "5" 'digit-argument) ; 5 - (define-key map "6" 'digit-argument) ; 6 - (define-key map "7" 'digit-argument) ; 7 - (define-key map "8" 'digit-argument) ; 8 - (define-key map "9" 'digit-argument) ; 9 - (define-key map ":" 'nil) ; : - (define-key map ";" 'tpu-trim-line-ends) ; ; - (define-key map "<" 'nil) ; < - (define-key map "=" 'nil) ; = - (define-key map ">" 'nil) ; > - (define-key map "?" 'tpu-spell-check) ; ? - (define-key map "A" 'tpu-toggle-newline-and-indent) ; A - (define-key map "B" 'tpu-next-buffer) ; B - (define-key map "C" 'repeat-complex-command) ; C - (define-key map "D" 'shell-command) ; D - (define-key map "E" 'tpu-exit) ; E - (define-key map "F" 'tpu-set-cursor-free) ; F - (define-key map "G" 'tpu-get) ; G - (define-key map "H" 'nil) ; H - (define-key map "I" 'tpu-include) ; I - (define-key map "K" 'tpu-kill-buffer) ; K - (define-key map "L" 'tpu-what-line) ; L - (define-key map "M" 'buffer-menu) ; M - (define-key map "N" 'tpu-next-file-buffer) ; N - (define-key map "O" 'occur) ; O - (define-key map "P" 'lpr-buffer) ; P - (define-key map "Q" 'tpu-quit) ; Q - (define-key map "R" 'tpu-toggle-rectangle) ; R - (define-key map "S" 'replace) ; S - (define-key map "T" 'tpu-line-to-top-of-window) ; T - (define-key map "U" 'undo) ; U - (define-key map "V" 'tpu-version) ; V - (define-key map "W" 'save-buffer) ; W - (define-key map "X" 'tpu-save-all-buffers-kill-emacs) ; X - (define-key map "Y" 'copy-region-as-kill) ; Y - (define-key map "Z" 'suspend-emacs) ; Z - (define-key map "[" 'blink-matching-open) ; [ - (define-key map "\\" 'nil) ; \ - (define-key map "]" 'blink-matching-open) ; ] - (define-key map "^" 'tpu-add-at-bol) ; ^ - (define-key map "_" 'split-window-vertically) ; - - (define-key map "`" 'what-line) ; ` - (define-key map "a" 'tpu-toggle-newline-and-indent) ; a - (define-key map "b" 'tpu-next-buffer) ; b - (define-key map "c" 'repeat-complex-command) ; c - (define-key map "d" 'shell-command) ; d - (define-key map "e" 'tpu-exit) ; e - (define-key map "f" 'tpu-set-cursor-free) ; f - (define-key map "g" 'tpu-get) ; g - (define-key map "h" 'nil) ; h - (define-key map "i" 'tpu-include) ; i - (define-key map "k" 'tpu-kill-buffer) ; k - (define-key map "l" 'goto-line) ; l - (define-key map "m" 'buffer-menu) ; m - (define-key map "n" 'tpu-next-file-buffer) ; n - (define-key map "o" 'occur) ; o - (define-key map "p" 'lpr-region) ; p - (define-key map "q" 'tpu-quit) ; q - (define-key map "r" 'tpu-toggle-rectangle) ; r - (define-key map "s" 'replace) ; s - (define-key map "t" 'tpu-line-to-top-of-window) ; t - (define-key map "u" 'undo) ; u - (define-key map "v" 'tpu-version) ; v - (define-key map "w" 'save-buffer) ; w + (define-key map "\C-A" 'tpu-toggle-overwrite-mode) ; ^A + ;; (define-key map "\C-B" nil) ; ^B + ;; (define-key map "\C-C" nil) ; ^C + ;; (define-key map "\C-D" nil) ; ^D + ;; (define-key map "\C-E" nil) ; ^E + (define-key map "\C-F" 'set-visited-file-name) ; ^F + (define-key map "\C-g" 'keyboard-quit) ; safety first + (define-key map "\C-h" 'delete-other-windows) ; BS + (define-key map "\C-i" 'other-window) ; TAB + ;; (define-key map "\C-J" nil) ; ^J + (define-key map "\C-K" 'tpu-define-macro-key) ; ^K + (define-key map "\C-l" 'downcase-region) ; ^L + ;; (define-key map "\C-M" nil) ; ^M + ;; (define-key map "\C-N" nil) ; ^N + ;; (define-key map "\C-O" nil) ; ^O + ;; (define-key map "\C-P" nil) ; ^P + ;; (define-key map "\C-Q" nil) ; ^Q + ;; (define-key map "\C-R" nil) ; ^R + ;; (define-key map "\C-S" nil) ; ^S + (define-key map "\C-T" 'tpu-toggle-control-keys) ; ^T + (define-key map "\C-u" 'upcase-region) ; ^U + ;; (define-key map "\C-V" nil) ; ^V + (define-key map "\C-w" 'tpu-write-current-buffers) ; ^W + ;; (define-key map "\C-X" nil) ; ^X + ;; (define-key map "\C-Y" nil) ; ^Y + ;; (define-key map "\C-Z" nil) ; ^Z + (define-key map " " 'undo) ; SPC + ;; (define-key map "!" nil) ; ! + ;; (define-key map "#" nil) ; # + (define-key map "$" 'tpu-add-at-eol) ; $ + (define-key map "%" 'tpu-goto-percent) ; % + ;; (define-key map "&" nil) ; & + ;; (define-key map "(" nil) ; ( + ;; (define-key map ")" nil) ; ) + (define-key map "*" 'tpu-toggle-regexp) ; * + ;; (define-key map "+" nil) ; + + (define-key map "," 'tpu-goto-breadcrumb) ; , + (define-key map "-" 'negative-argument) ; - + (define-key map "." 'tpu-drop-breadcrumb) ; . + (define-key map "/" 'tpu-emacs-replace) ; / + (define-key map "0" 'digit-argument) ; 0 + (define-key map "1" 'digit-argument) ; 1 + (define-key map "2" 'digit-argument) ; 2 + (define-key map "3" 'digit-argument) ; 3 + (define-key map "4" 'digit-argument) ; 4 + (define-key map "5" 'digit-argument) ; 5 + (define-key map "6" 'digit-argument) ; 6 + (define-key map "7" 'digit-argument) ; 7 + (define-key map "8" 'digit-argument) ; 8 + (define-key map "9" 'digit-argument) ; 9 + ;; (define-key map ":" nil) ; : + (define-key map ";" 'tpu-trim-line-ends) ; ; + ;; (define-key map "<" nil) ; < + ;; (define-key map "=" nil) ; = + ;; (define-key map ">" nil) ; > + (define-key map "?" 'tpu-spell-check) ; ? + ;; (define-key map "A" 'tpu-toggle-newline-and-indent) ; A + ;; (define-key map "B" 'tpu-next-buffer) ; B + ;; (define-key map "C" 'repeat-complex-command) ; C + ;; (define-key map "D" 'shell-command) ; D + ;; (define-key map "E" 'tpu-exit) ; E + ;; (define-key map "F" 'tpu-cursor-free-mode) ; F + ;; (define-key map "G" 'tpu-get) ; G + ;; (define-key map "H" nil) ; H + ;; (define-key map "I" 'tpu-include) ; I + ;; (define-key map "K" 'tpu-kill-buffer) ; K + (define-key map "L" 'tpu-what-line) ; L + ;; (define-key map "M" 'buffer-menu) ; M + ;; (define-key map "N" 'tpu-next-file-buffer) ; N + ;; (define-key map "O" 'occur) ; O + (define-key map "P" 'lpr-buffer) ; P + ;; (define-key map "Q" 'tpu-quit) ; Q + ;; (define-key map "R" 'tpu-toggle-rectangle) ; R + ;; (define-key map "S" 'replace) ; S + ;; (define-key map "T" 'tpu-line-to-top-of-window) ; T + ;; (define-key map "U" 'undo) ; U + ;; (define-key map "V" 'tpu-version) ; V + ;; (define-key map "W" 'save-buffer) ; W + ;; (define-key map "X" 'tpu-save-all-buffers-kill-emacs) ; X + ;; (define-key map "Y" 'copy-region-as-kill) ; Y + ;; (define-key map "Z" 'suspend-emacs) ; Z + (define-key map "[" 'blink-matching-open) ; [ + ;; (define-key map "\\" nil) ; \ + (define-key map "]" 'blink-matching-open) ; ] + (define-key map "^" 'tpu-add-at-bol) ; ^ + (define-key map "_" 'split-window-vertically) ; - + (define-key map "`" 'what-line) ; ` + (define-key map "a" 'tpu-toggle-newline-and-indent) ; a + (define-key map "b" 'tpu-next-buffer) ; b + (define-key map "c" 'repeat-complex-command) ; c + (define-key map "d" 'shell-command) ; d + (define-key map "e" 'tpu-exit) ; e + (define-key map "f" 'tpu-cursor-free-mode) ; f + (define-key map "g" 'tpu-get) ; g + ;; (define-key map "h" nil) ; h + (define-key map "i" 'tpu-include) ; i + (define-key map "k" 'tpu-kill-buffer) ; k + (define-key map "l" 'goto-line) ; l + (define-key map "m" 'buffer-menu) ; m + (define-key map "n" 'tpu-next-file-buffer) ; n + (define-key map "o" 'occur) ; o + (define-key map "p" 'lpr-region) ; p + (define-key map "q" 'tpu-quit) ; q + (define-key map "r" 'tpu-toggle-rectangle) ; r + (define-key map "s" 'replace) ; s + (define-key map "t" 'tpu-line-to-top-of-window) ; t + (define-key map "u" 'undo) ; u + (define-key map "v" 'tpu-version) ; v + (define-key map "w" 'save-buffer) ; w (define-key map "x" 'tpu-save-all-buffers-kill-emacs) ; x - (define-key map "y" 'copy-region-as-kill) ; y - (define-key map "z" 'suspend-emacs) ; z - (define-key map "{" 'nil) ; { - (define-key map "|" 'split-window-horizontally) ; | - (define-key map "}" 'nil) ; } - (define-key map "~" 'exchange-point-and-mark) ; ~ - (define-key map "\177" 'delete-window) ; <X] + (define-key map "y" 'copy-region-as-kill) ; y + (define-key map "z" 'suspend-emacs) ; z + ;; (define-key map "{" nil) ; { + (define-key map "|" 'split-window-horizontally) ; | + ;; (define-key map "}" nil) ; } + (define-key map "~" 'exchange-point-and-mark) ; ~ + (define-key map "\177" 'delete-window) ; <X] map) "Maps the function keys on the VT100 keyboard preceded by PF1. GOLD is the ASCII 7-bit escape sequence <ESC>OP.") @@ -502,61 +502,61 @@ GOLD is the ASCII 7-bit escape sequence <ESC>OP.") ;; Previously defined in CSI-map. We now presume that term/*.el does ;; its job to map the escape sequence to the right key-symbol. - (define-key map [find] 'tpu-search) ; Find - (define-key map [insert] 'tpu-paste) ; Insert Here - (define-key map [delete] 'tpu-cut) ; Remove - (define-key map [select] 'tpu-select) ; Select - (define-key map [prior] 'tpu-scroll-window-down) ; Prev Screen - (define-key map [next] 'tpu-scroll-window-up) ; Next Screen - - (define-key map [f1] 'nil) ; F1 - (define-key map [f2] 'nil) ; F2 - (define-key map [f3] 'nil) ; F3 - (define-key map [f4] 'nil) ; F4 - (define-key map [f5] 'nil) ; F5 - (define-key map [f6] 'nil) ; F6 - (define-key map [f7] 'nil) ; F7 - (define-key map [f8] 'nil) ; F8 - (define-key map [f9] 'nil) ; F9 - (define-key map [f10] 'tpu-exit) ; F10 - (define-key map [f11] 'tpu-insert-escape) ; F11 (ESC) - (define-key map [f12] 'tpu-next-beginning-of-line) ; F12 (BS) - (define-key map [f13] 'tpu-delete-previous-word) ; F13 (LF) - (define-key map [f14] 'tpu-toggle-overwrite-mode) ; F14 - (define-key map [help] 'tpu-help) ; HELP - (define-key map [menu] 'execute-extended-command) ; DO - (define-key map [f17] 'tpu-goto-breadcrumb) ; F17 - (define-key map [f18] 'nil) ; F18 - (define-key map [f19] 'nil) ; F19 - (define-key map [f20] 'nil) ; F20 + (define-key map [find] 'tpu-search) ; Find + (define-key map [insert] 'tpu-paste) ; Insert Here + (define-key map [delete] 'tpu-cut) ; Remove + (define-key map [select] 'tpu-select) ; Select + (define-key map [prior] 'tpu-scroll-window-down) ; Prev Screen + (define-key map [next] 'tpu-scroll-window-up) ; Next Screen + + ;; (define-key map [f1] nil) ; F1 + ;; (define-key map [f2] nil) ; F2 + ;; (define-key map [f3] nil) ; F3 + ;; (define-key map [f4] nil) ; F4 + ;; (define-key map [f5] nil) ; F5 + ;; (define-key map [f6] nil) ; F6 + ;; (define-key map [f7] nil) ; F7 + ;; (define-key map [f8] nil) ; F8 + ;; (define-key map [f9] nil) ; F9 + (define-key map [f10] 'tpu-exit) ; F10 + (define-key map [f11] 'tpu-insert-escape) ; F11 (ESC) + (define-key map [f12] 'tpu-next-beginning-of-line) ; F12 (BS) + (define-key map [f13] 'tpu-delete-previous-word) ; F13 (LF) + (define-key map [f14] 'tpu-toggle-overwrite-mode) ; F14 + (define-key map [help] 'tpu-help) ; HELP + (define-key map [menu] 'execute-extended-command) ; DO + (define-key map [f17] 'tpu-goto-breadcrumb) ; F17 + ;; (define-key map [f18] nil) ; F18 + ;; (define-key map [f19] nil) ; F19 + ;; (define-key map [f20] nil) ; F20 ;; Previously defined in SS3-map. We now presume that term/*.el does ;; its job to map the escape sequence to the right key-symbol. - (define-key map [kp-f1] tpu-gold-map) ; GOLD map + (define-key map [kp-f1] tpu-gold-map) ; GOLD map ;; - (define-key map [up] 'tpu-previous-line) ; up - (define-key map [down] 'tpu-next-line) ; down - (define-key map [right] 'tpu-forward-char) ; right - (define-key map [left] 'tpu-backward-char) ; left - - (define-key map [kp-f2] 'tpu-help) ; PF2 - (define-key map [kp-f3] 'tpu-search-again) ; PF3 - (define-key map [kp-f4] 'tpu-delete-current-line) ; PF4 - (define-key map [kp-0] 'tpu-line) ; KP0 - (define-key map [kp-1] 'tpu-word) ; KP1 - (define-key map [kp-2] 'tpu-end-of-line) ; KP2 - (define-key map [kp-3] 'tpu-char) ; KP3 - (define-key map [kp-4] 'tpu-advance-direction) ; KP4 - (define-key map [kp-5] 'tpu-backup-direction) ; KP5 - (define-key map [kp-6] 'tpu-cut) ; KP6 - (define-key map [kp-7] 'tpu-page) ; KP7 - (define-key map [kp-8] 'tpu-scroll-window) ; KP8 - (define-key map [kp-9] 'tpu-append-region) ; KP9 + (define-key map [up] 'tpu-previous-line) ; up + (define-key map [down] 'tpu-next-line) ; down + (define-key map [right] 'tpu-forward-char) ; right + (define-key map [left] 'tpu-backward-char) ; left + + (define-key map [kp-f2] 'tpu-help) ; PF2 + (define-key map [kp-f3] 'tpu-search-again) ; PF3 + (define-key map [kp-f4] 'tpu-delete-current-line) ; PF4 + (define-key map [kp-0] 'tpu-line) ; KP0 + (define-key map [kp-1] 'tpu-word) ; KP1 + (define-key map [kp-2] 'tpu-end-of-line) ; KP2 + (define-key map [kp-3] 'tpu-char) ; KP3 + (define-key map [kp-4] 'tpu-advance-direction) ; KP4 + (define-key map [kp-5] 'tpu-backup-direction) ; KP5 + (define-key map [kp-6] 'tpu-cut) ; KP6 + (define-key map [kp-7] 'tpu-page) ; KP7 + (define-key map [kp-8] 'tpu-scroll-window) ; KP8 + (define-key map [kp-9] 'tpu-append-region) ; KP9 (define-key map [kp-subtract] 'tpu-delete-current-word) ; KP- (define-key map [kp-separator] 'tpu-delete-current-char) ; KP, - (define-key map [kp-decimal] 'tpu-select) ; KP. - (define-key map [kp-enter] 'newline) ; KPenter + (define-key map [kp-decimal] 'tpu-select) ; KP. + (define-key map [kp-enter] 'newline) ; KPenter map) "TPU-edt global keymap.") @@ -2225,8 +2225,8 @@ Accepts a prefix argument for the number of tpu-pan-columns to scroll." ;;; ;;; Minibuffer map additions to set search direction ;;; -(define-key minibuffer-local-map "\eOt" 'tpu-search-forward-exit) ;KP4 -(define-key minibuffer-local-map "\eOu" 'tpu-search-backward-exit) ;KP5 +(define-key minibuffer-local-map [kp-4] 'tpu-search-forward-exit) ;KP4 +(define-key minibuffer-local-map [kp-5] 'tpu-search-backward-exit) ;KP5 ;;; @@ -2428,6 +2428,33 @@ If FILE is nil, try to load a default file. The default file names are (ad-disable-regexp "\\`tpu-") (setq tpu-edt-mode nil)) + +;;;### (autoloads (tpu-set-cursor-bound tpu-set-cursor-free tpu-set-scroll-margins +;;;;;; tpu-cursor-free-mode) "tpu-extras" "tpu-extras.el" "e0629234f1abe076917a303456b48329") +;;; Generated autoloads from tpu-extras.el + +(autoload 'tpu-cursor-free-mode "tpu-extras" "\ +Minor mode to allow the cursor to move freely about the screen. + +\(fn &optional ARG)" t nil) + +(autoload 'tpu-set-scroll-margins "tpu-extras" "\ +Set scroll margins. + +\(fn TOP BOTTOM)" t nil) + +(autoload 'tpu-set-cursor-free "tpu-extras" "\ +Allow the cursor to move freely about the screen. + +\(fn)" t nil) + +(autoload 'tpu-set-cursor-bound "tpu-extras" "\ +Constrain the cursor to the flow of the text. + +\(fn)" t nil) + +;;;*** + (provide 'tpu-edt) ;; arch-tag: f3dfe61c-2cbd-4f73-b9cc-eb215020b857 diff --git a/lisp/emulation/tpu-extras.el b/lisp/emulation/tpu-extras.el index 609ce2e203b..062082a295a 100644 --- a/lisp/emulation/tpu-extras.el +++ b/lisp/emulation/tpu-extras.el @@ -112,18 +112,18 @@ ;;; Customization variables (defcustom tpu-top-scroll-margin 0 - "*Scroll margin at the top of the screen. + "Scroll margin at the top of the screen. Interpreted as a percent of the current window size." :type 'integer :group 'tpu) (defcustom tpu-bottom-scroll-margin 0 - "*Scroll margin at the bottom of the screen. + "Scroll margin at the bottom of the screen. Interpreted as a percent of the current window size." :type 'integer :group 'tpu) (defcustom tpu-backward-char-like-tpu t - "*If non-nil, in free cursor mode backward-char (left-arrow) works + "If non-nil, in free cursor mode backward-char (left-arrow) works just like TPU/edt. Otherwise, backward-char will move to the end of the previous line when starting from a line beginning." :type 'boolean @@ -132,8 +132,12 @@ the previous line when starting from a line beginning." ;;; Global variables -(defvar tpu-cursor-free nil - "If non-nil, let the cursor roam free.") +;;;###autoload +(define-minor-mode tpu-cursor-free-mode + "Minor mode to allow the cursor to move freely about the screen." + :init-value nil + (if (not tpu-cursor-free-mode) + (tpu-trim-line-ends))) ;;; Hooks -- Set cursor free in picture mode. @@ -141,11 +145,10 @@ the previous line when starting from a line beginning." (add-hook 'picture-mode-hook 'tpu-set-cursor-free) -(defun tpu-before-save-hook () +(defun tpu-trim-line-ends-if-needed () "Eliminate whitespace at ends of lines, if the cursor is free." - (if (and (buffer-modified-p) tpu-cursor-free) (tpu-trim-line-ends))) - -(add-hook 'before-save-hook 'tpu-before-save-hook) + (if (and (buffer-modified-p) tpu-cursor-free-mode) (tpu-trim-line-ends))) +(add-hook 'before-save-hook 'tpu-trim-line-ends-if-needed) ;;; Utility routines for implementing scroll margins @@ -171,12 +174,12 @@ the previous line when starting from a line beginning." (defun tpu-forward-char (num) "Move right ARG characters (left if ARG is negative)." (interactive "p") - (if tpu-cursor-free (picture-forward-column num) (forward-char num))) + (if tpu-cursor-free-mode (picture-forward-column num) (forward-char num))) (defun tpu-backward-char (num) "Move left ARG characters (right if ARG is negative)." (interactive "p") - (cond ((not tpu-cursor-free) + (cond ((not tpu-cursor-free-mode) (backward-char num)) (tpu-backward-char-like-tpu (picture-backward-column num)) @@ -195,8 +198,8 @@ the previous line when starting from a line beginning." Prefix argument serves as a repeat count." (interactive "p") (let ((beg (tpu-current-line))) - (if tpu-cursor-free (or (eobp) (picture-move-down num)) - (next-line-internal num)) + (if tpu-cursor-free-mode (or (eobp) (picture-move-down num)) + (line-move num)) (tpu-bottom-check beg num) (setq this-command 'next-line))) @@ -205,7 +208,7 @@ Prefix argument serves as a repeat count." Prefix argument serves as a repeat count." (interactive "p") (let ((beg (tpu-current-line))) - (if tpu-cursor-free (picture-move-up num) (next-line-internal (- num))) + (if tpu-cursor-free-mode (picture-move-up num) (line-move (- num))) (tpu-top-check beg num) (setq this-command 'previous-line))) @@ -223,7 +226,7 @@ Accepts a prefix argument for the number of lines to move." Accepts a prefix argument for the number of lines to move." (interactive "p") (let ((beg (tpu-current-line))) - (cond (tpu-cursor-free + (cond (tpu-cursor-free-mode (let ((beg (point))) (if (< 1 num) (forward-line num)) (picture-end-of-line) @@ -238,7 +241,7 @@ Accepts a prefix argument for the number of lines to move." Accepts a prefix argument for the number of lines to move." (interactive "p") (let ((beg (tpu-current-line))) - (cond (tpu-cursor-free + (cond (tpu-cursor-free-mode (picture-end-of-line (- 1 num))) (t (end-of-line (- 1 num)))) @@ -248,7 +251,7 @@ Accepts a prefix argument for the number of lines to move." "Move point to end of current line." (interactive) (let ((beg (point))) - (if tpu-cursor-free (picture-end-of-line) (end-of-line)) + (if tpu-cursor-free-mode (picture-end-of-line) (end-of-line)) (if (= beg (point)) (message "You are already at the end of a line.")))) (defun tpu-forward-line (num) @@ -256,9 +259,8 @@ Accepts a prefix argument for the number of lines to move." Prefix argument serves as a repeat count." (interactive "p") (let ((beg (tpu-current-line))) - (next-line-internal num) - (tpu-bottom-check beg num) - (beginning-of-line))) + (forward-line num) + (tpu-bottom-check beg num))) (defun tpu-backward-line (num) "Move to beginning of previous line. @@ -266,9 +268,8 @@ Prefix argument serves as repeat count." (interactive "p") (let ((beg (tpu-current-line))) (or (bolp) (>= 0 num) (setq num (- num 1))) - (next-line-internal (- num)) - (tpu-top-check beg num) - (beginning-of-line))) + (forward-line (- num)) + (tpu-top-check beg num))) ;;; Movement by paragraph @@ -346,7 +347,7 @@ A repeat count means scroll that many sections." (let* ((beg (tpu-current-line)) (height (1- (window-height))) (lines (* num (/ (* height tpu-percent-scroll) 100)))) - (next-line-internal (- lines)) + (line-move (- lines)) (tpu-top-check beg lines))) (defun tpu-scroll-window-up (num) @@ -356,7 +357,7 @@ A repeat count means scroll that many sections." (let* ((beg (tpu-current-line)) (height (1- (window-height))) (lines (* num (/ (* height tpu-percent-scroll) 100)))) - (next-line-internal lines) + (line-move lines) (tpu-bottom-check beg lines))) @@ -448,22 +449,19 @@ A repeat count means scroll that many sections." (defun tpu-set-cursor-free () "Allow the cursor to move freely about the screen." (interactive) - (setq tpu-cursor-free t) - (substitute-key-definition 'tpu-set-cursor-free - 'tpu-set-cursor-bound - GOLD-map) + (tpu-cursor-free-mode 1) (message "The cursor will now move freely about the screen.")) ;;;###autoload (defun tpu-set-cursor-bound () "Constrain the cursor to the flow of the text." (interactive) - (tpu-trim-line-ends) - (setq tpu-cursor-free nil) - (substitute-key-definition 'tpu-set-cursor-bound - 'tpu-set-cursor-free - GOLD-map) + (tpu-cursor-free-mode -1) (message "The cursor is now bound to the flow of your text.")) +;; Local Variables: +;; generated-autoload-file: "tpu-edt.el" +;; End: + ;; arch-tag: 89676fa4-33ec-48cb-9135-6f3bf230ab1a ;;; tpu-extras.el ends here diff --git a/lisp/emulation/viper-cmd.el b/lisp/emulation/viper-cmd.el index 8dd22e9ea1f..82dc312cf28 100644 --- a/lisp/emulation/viper-cmd.el +++ b/lisp/emulation/viper-cmd.el @@ -1116,7 +1116,7 @@ as a Meta key and any number of multiple escapes is allowed." "Function that implements ESC key in Viper emulation of Vi." (interactive) (let ((cmd (or (key-binding (viper-envelop-ESC-key)) - '(lambda () (interactive) (error ""))))) + '(lambda () (interactive) (error "Viper bell"))))) ;; call the actual function to execute ESC (if no other symbols followed) ;; or the key bound to the ESC sequence (if the sequence was issued @@ -1238,7 +1238,7 @@ as a Meta key and any number of multiple escapes is allowed." ;; it is an error. (progn ;; new com is (CHAR . OLDCOM) - (if (viper-memq-char char '(?# ?\")) (error "")) + (if (viper-memq-char char '(?# ?\")) (error "Viper bell")) (setq com (cons char com)) (setq cont nil)) ;; If com is nil we set com as char, and read more. Again, if char is @@ -1257,7 +1257,7 @@ as a Meta key and any number of multiple escapes is allowed." (let ((reg (read-char))) (if (viper-valid-register reg) (setq viper-use-register reg) - (error "")) + (error "Viper bell")) (setq char (read-char)))) (t (setq com char) @@ -1279,7 +1279,7 @@ as a Meta key and any number of multiple escapes is allowed." (viper-regsuffix-command-p char) (viper= char ?!) ; bang command (viper= char ?g) ; the gg command (like G0) - (error "")) + (error "Viper bell")) (setq cmd-to-exec-at-end (viper-exec-form-in-vi `(key-binding (char-to-string ,char))))) @@ -1313,7 +1313,7 @@ as a Meta key and any number of multiple escapes is allowed." ((equal com '(?= . ?=)) (viper-line (cons value ?=))) ;; gg acts as G0 ((equal (car com) ?g) (viper-goto-line 0)) - (t (error ""))))) + (t (error "Viper bell"))))) (if cmd-to-exec-at-end (progn @@ -2738,9 +2738,9 @@ On reaching end of line, stop and signal error." ;; the forward motion before the 'viper-execute-com', but, of ;; course, 'dl' doesn't work on an empty line, so we have to ;; catch that condition before 'viper-execute-com' - (if (and (eolp) (bolp)) (error "") (forward-char val)) + (if (and (eolp) (bolp)) (error "Viper bell") (forward-char val)) (if com (viper-execute-com 'viper-forward-char val com)) - (if (eolp) (progn (backward-char 1) (error "")))) + (if (eolp) (progn (backward-char 1) (error "Viper bell")))) (forward-char val) (if com (viper-execute-com 'viper-forward-char val com))))) @@ -2755,7 +2755,7 @@ On reaching beginning of line, stop and signal error." (if com (viper-move-marker-locally 'viper-com-point (point))) (if viper-ex-style-motion (progn - (if (bolp) (error "") (backward-char val)) + (if (bolp) (error "Viper bell") (backward-char val)) (if com (viper-execute-com 'viper-backward-char val com))) (backward-char val) (if com (viper-execute-com 'viper-backward-char val com))))) @@ -3078,7 +3078,7 @@ On reaching beginning of line, stop and signal error." (if com (viper-execute-com 'viper-goto-col val com)) (save-excursion (end-of-line) - (if (> val (current-column)) (error ""))) + (if (> val (current-column)) (error "Viper bell"))) )) @@ -3198,7 +3198,7 @@ If point is on a widget or a button, simulate clicking on that widget/button." ;; If FORWARD then search is forward, otherwise backward. OFFSET is used to ;; adjust point after search. (defun viper-find-char (arg char forward offset) - (or (char-or-string-p char) (error "")) + (or (char-or-string-p char) (error "Viper bell")) (let ((arg (if forward arg (- arg))) (cmd (if (eq viper-intermediate-command 'viper-repeat) (nth 5 viper-d-com) @@ -3544,7 +3544,7 @@ controlled by the sign of prefix numeric value." (if com (viper-move-marker-locally 'viper-com-point (point))) (backward-sexp 1) (if com (viper-execute-com 'viper-paren-match nil com))) - (t (error "")))))) + (t (error "Viper bell")))))) (defun viper-toggle-parse-sexp-ignore-comments () (interactive) @@ -4107,7 +4107,7 @@ Null string will repeat previous search." (let ((reg viper-use-register)) (setq viper-use-register nil) (error viper-EmptyRegister reg)) - (error ""))) + (error "Viper bell"))) (setq viper-use-register nil) (if (viper-end-with-a-newline-p text) (progn @@ -4157,7 +4157,7 @@ Null string will repeat previous search." (let ((reg viper-use-register)) (setq viper-use-register nil) (error viper-EmptyRegister reg)) - (error ""))) + (error "Viper bell"))) (setq viper-use-register nil) (if (viper-end-with-a-newline-p text) (beginning-of-line)) (viper-set-destructive-command @@ -4202,7 +4202,7 @@ Null string will repeat previous search." (> val (viper-chars-in-region (point) (viper-line-pos 'end)))) (setq val (viper-chars-in-region (point) (viper-line-pos 'end)))) (if (and viper-ex-style-motion (eolp)) - (if (bolp) (error "") (setq val 0))) ; not bol---simply back 1 ch + (if (bolp) (error "Viper bell") (setq val 0))) ; not bol---simply back 1 ch (save-excursion (viper-forward-char-carefully val) (setq end-del-pos (point))) @@ -4467,7 +4467,7 @@ and regexp replace." ((viper= char ?,) (viper-cycle-through-mark-ring)) ((viper= char ?^) (push-mark viper-saved-mark t t)) ((viper= char ?D) (mark-defun)) - (t (error "")) + (t (error "Viper bell")) ))) ;; Algorithm: If first invocation of this command save mark on ring, goto @@ -4566,7 +4566,7 @@ One can use `` and '' to temporarily jump 1 step back." (switch-to-buffer buff) (goto-char viper-com-point) (viper-change-state-to-vi) - (error ""))))) + (error "Viper bell"))))) ((and (not skip-white) (viper= char ?`)) (if com (viper-move-marker-locally 'viper-com-point (point))) (if (and (viper-same-line (point) viper-last-jump) diff --git a/lisp/emulation/viper-ex.el b/lisp/emulation/viper-ex.el index fda882ae6a2..627d2ff1814 100644 --- a/lisp/emulation/viper-ex.el +++ b/lisp/emulation/viper-ex.el @@ -1236,7 +1236,7 @@ reversed." (read-string "[Hit return to confirm] ") (quit (save-excursion (kill-buffer " *delete text*")) - (error ""))) + (error "Viper bell"))) (save-excursion (kill-buffer " *delete text*"))) (if ex-buffer (cond ((viper-valid-register ex-buffer '(Letter)) diff --git a/lisp/emulation/viper.el b/lisp/emulation/viper.el index 63cafb4a734..ff3217ac144 100644 --- a/lisp/emulation/viper.el +++ b/lisp/emulation/viper.el @@ -9,7 +9,7 @@ ;; Author: Michael Kifer <kifer@cs.stonybrook.edu> ;; Keywords: emulations -(defconst viper-version "3.14 of June 14, 2007" +(defconst viper-version "3.14 of August 18, 2007" "The current version of Viper") ;; This file is part of GNU Emacs. @@ -646,6 +646,11 @@ This startup message appears whenever you load Viper, unless you type `y' now." (remove-hook symbol 'viper-change-state-to-emacs) (remove-hook symbol 'viper-change-state-to-insert) (remove-hook symbol 'viper-change-state-to-vi) + (remove-hook symbol 'viper-minibuffer-post-command-hook) + (remove-hook symbol 'viper-minibuffer-setup-sentinel) + (remove-hook symbol 'viper-major-mode-change-sentinel) + (remove-hook symbol 'set-viper-state-in-major-mode) + (remove-hook symbol 'viper-post-command-sentinel) ))) ;; Remove local value in all existing buffers @@ -682,6 +687,9 @@ It also can't undo some Viper settings." global-mode-string (delq 'viper-mode-string global-mode-string)) + (setq default-major-mode + (viper-standard-value 'default-major-mode viper-saved-non-viper-variables)) + (if viper-emacs-p (setq-default mark-even-if-inactive @@ -772,9 +780,7 @@ It also can't undo some Viper settings." (mapatoms 'viper-remove-hooks) (remove-hook 'comint-mode-hook 'viper-comint-mode-hook) (remove-hook 'erc-mode-hook 'viper-comint-mode-hook) - (remove-hook 'minibuffer-setup-hook 'viper-minibuffer-setup-sentinel) (remove-hook 'change-major-mode-hook 'viper-major-mode-change-sentinel) - (remove-hook 'post-command-hook 'viper-minibuffer-post-command-hook) ;; unbind Viper mouse bindings (viper-unbind-mouse-search-key) @@ -1214,6 +1220,7 @@ These two lines must come in the order given. (if (null viper-saved-non-viper-variables) (setq viper-saved-non-viper-variables (list + (cons 'default-major-mode (list default-major-mode)) (cons 'next-line-add-newlines (list next-line-add-newlines)) (cons 'require-final-newline (list require-final-newline)) (cons 'scroll-step (list scroll-step)) |