summaryrefslogtreecommitdiff
path: root/lisp/term/sun.el
diff options
context:
space:
mode:
authorKaroly Lorentey <lorentey@elte.hu>2005-09-04 03:48:17 +0000
committerKaroly Lorentey <lorentey@elte.hu>2005-09-04 03:48:17 +0000
commitfbf349734468d48b421c3d03074bb66dfcf3115b (patch)
tree0a7d1ee844b6c591a5a499d23e35931945106e5a /lisp/term/sun.el
parentf0caabd962b662cccbea472995d86af718cc8d0b (diff)
parent4b5fa40e1f1ba3cafde672863a0331311d1c2695 (diff)
downloademacs-fbf349734468d48b421c3d03074bb66dfcf3115b.tar.gz
Merged in changes from CVS trunk. Plus added lisp/term tweaks.
Patches applied: * lorentey@elte.hu--2004/emacs--cvs-trunk--0--base-0 tag of miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-474 * lorentey@elte.hu--2004/emacs--cvs-trunk--0--patch-1 Add CVS metadata files. * lorentey@elte.hu--2004/emacs--cvs-trunk--0--patch-2 Update from CVS. git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-393
Diffstat (limited to 'lisp/term/sun.el')
-rw-r--r--lisp/term/sun.el217
1 files changed, 111 insertions, 106 deletions
diff --git a/lisp/term/sun.el b/lisp/term/sun.el
index 17018475514..38134d2cd49 100644
--- a/lisp/term/sun.el
+++ b/lisp/term/sun.el
@@ -1,6 +1,7 @@
;;; sun.el --- keybinding for standard default sunterm keys
-;; Copyright (C) 1987, 2001 Free Software Foundation, Inc.
+;; Copyright (C) 1987, 2001, 2002, 2003, 2004,
+;; 2005 Free Software Foundation, Inc.
;; Author: Jeff Peck <peck@sun.com>
;; Keywords: terminals
@@ -93,58 +94,6 @@
;;
(defvar sun-raw-prefix (make-sparse-keymap))
-(define-key (terminal-local-value 'local-function-key-map nil) "\e[" sun-raw-prefix)
-
-(define-key sun-raw-prefix "210z" [r3])
-(define-key sun-raw-prefix "213z" [r6])
-(define-key sun-raw-prefix "214z" [r7])
-(define-key sun-raw-prefix "216z" [r9])
-(define-key sun-raw-prefix "218z" [r11])
-(define-key sun-raw-prefix "220z" [r13])
-(define-key sun-raw-prefix "222z" [r15])
-(define-key sun-raw-prefix "193z" [redo])
-(define-key sun-raw-prefix "194z" [props])
-(define-key sun-raw-prefix "195z" [undo])
-;; (define-key sun-raw-prefix "196z" 'ignore) ; Expose-down
-;; (define-key sun-raw-prefix "197z" [put])
-;; (define-key sun-raw-prefix "198z" 'ignore) ; Open-down
-;; (define-key sun-raw-prefix "199z" [get])
-(define-key sun-raw-prefix "200z" [find])
-;; (define-key sun-raw-prefix "201z" 'kill-region-and-unmark) ; Delete
-(define-key sun-raw-prefix "224z" [f1])
-(define-key sun-raw-prefix "225z" [f2])
-(define-key sun-raw-prefix "226z" [f3])
-(define-key sun-raw-prefix "227z" [f4])
-(define-key sun-raw-prefix "228z" [f5])
-(define-key sun-raw-prefix "229z" [f6])
-(define-key sun-raw-prefix "230z" [f7])
-(define-key sun-raw-prefix "231z" [f8])
-(define-key sun-raw-prefix "232z" [f9])
-(define-key sun-raw-prefix "233z" [f10])
-(define-key sun-raw-prefix "234z" [f11])
-(define-key sun-raw-prefix "235z" [f12])
-(define-key sun-raw-prefix "A" [up]) ; R8
-(define-key sun-raw-prefix "B" [down]) ; R14
-(define-key sun-raw-prefix "C" [right]) ; R12
-(define-key sun-raw-prefix "D" [left]) ; R10
-
-(global-set-key [r3] 'backward-page)
-(global-set-key [r6] 'forward-page)
-(global-set-key [r7] 'beginning-of-buffer)
-(global-set-key [r9] 'scroll-down)
-(global-set-key [r11] 'recenter)
-(global-set-key [r13] 'end-of-buffer)
-(global-set-key [r15] 'scroll-up)
-(global-set-key [redo] 'redraw-display) ;FIXME: collides with default.
-(global-set-key [props] 'list-buffers)
-(global-set-key [put] 'sun-select-region)
-(global-set-key [get] 'sun-yank-selection)
-(global-set-key [find] 'exchange-point-and-mark)
-(global-set-key [f3] 'scroll-down-in-place)
-(global-set-key [f4] 'scroll-up-in-place)
-(global-set-key [f6] 'shrink-window)
-(global-set-key [f7] 'enlarge-window)
-
;; Since .emacs gets loaded before this file, a hook is supplied
;; for you to put your own bindings in.
@@ -152,13 +101,6 @@
(defvar sun-raw-prefix-hooks nil
"List of forms to evaluate after setting sun-raw-prefix.")
-(when sun-raw-prefix-hooks
- (message "sun-raw-prefix-hooks is obsolete! Use term-setup-hook instead!")
- (let ((hooks sun-raw-prefix-hooks))
- (while hooks
- (eval (car hooks))
- (setq hooks (cdr hooks)))))
-
;;; This section adds definitions for the emacstool users
;; emacstool event filter converts function keys to C-x*{c}{lrt}
@@ -188,44 +130,6 @@
(defvar suntool-map (make-sparse-keymap)
"*Keymap for Emacstool bindings.")
-(define-key suntool-map "gr" 'beginning-of-buffer) ; r7
-(define-key suntool-map "iR" 'backward-page) ; R9
-(define-key suntool-map "ir" 'scroll-down) ; r9
-(define-key suntool-map "kr" 'recenter) ; r11
-(define-key suntool-map "mr" 'end-of-buffer) ; r13
-(define-key suntool-map "oR" 'forward-page) ; R15
-(define-key suntool-map "or" 'scroll-up) ; r15
-(define-key suntool-map "b\M-L" 'rerun-prev-command) ; M-AGAIN
-(define-key suntool-map "b\M-l" 'prev-complex-command) ; M-Again
-(define-key suntool-map "bl" 'redraw-display) ; Again
-(define-key suntool-map "cl" 'list-buffers) ; Props
-(define-key suntool-map "dl" 'undo) ; Undo
-(define-key suntool-map "el" 'ignore) ; Expose-Open
-(define-key suntool-map "fl" 'sun-select-region) ; Put
-(define-key suntool-map "f," 'copy-region-as-kill) ; C-Put
-(define-key suntool-map "gl" 'ignore) ; Open-Open
-(define-key suntool-map "hl" 'sun-yank-selection) ; Get
-(define-key suntool-map "h," 'yank) ; C-Get
-(define-key suntool-map "il" 'research-forward) ; Find
-(define-key suntool-map "i," 're-search-forward) ; C-Find
-(define-key suntool-map "i\M-l" 'research-backward) ; M-Find
-(define-key suntool-map "i\M-," 're-search-backward) ; C-M-Find
-
-(define-key suntool-map "jL" 'yank) ; DELETE
-(define-key suntool-map "jl" 'kill-region-and-unmark) ; Delete
-(define-key suntool-map "j\M-l" 'exchange-point-and-mark); M-Delete
-(define-key suntool-map "j,"
- (lambda () (interactive) (pop-mark))) ; C-Delete
-
-(define-key suntool-map "fT" 'shrink-window-horizontally) ; T6
-(define-key suntool-map "gT" 'enlarge-window-horizontally) ; T7
-(define-key suntool-map "ft" 'shrink-window) ; t6
-(define-key suntool-map "gt" 'enlarge-window) ; t7
-(define-key suntool-map "cT" (lambda (n) (interactive "p") (scroll-down n)))
-(define-key suntool-map "dT" (lambda (n) (interactive "p") (scroll-up n)))
-(define-key suntool-map "ct" 'scroll-down-in-place) ; t3
-(define-key suntool-map "dt" 'scroll-up-in-place) ; t4
-(define-key ctl-x-map "*" suntool-map)
;; Since .emacs gets loaded before this file, a hook is supplied
;; for you to put your own bindings in.
@@ -233,13 +137,6 @@
(defvar suntool-map-hooks nil
"List of forms to evaluate after setting suntool-map.")
-(when suntool-map-hooks
- (message "suntool-map-hooks is obsolete! Use term-setup-hook instead!")
- (let ((hooks suntool-map-hooks))
- (while hooks
- (eval (car hooks))
- (setq hooks (cdr hooks)))))
-
;;
;; If running under emacstool, arrange to call suspend-emacstool
;; instead of suspend-emacs.
@@ -251,6 +148,115 @@
(autoload 'sun-mouse-handler "sun-mouse"
"Sun Emacstool handler for mouse blips (not loaded)." t)
+(defun terminal-init-sun ()
+ "Terminal initialization function for sun."
+ (define-key (terminal-local-value 'local-function-key-map nil) "\e[" sun-raw-prefix)
+
+ (define-key sun-raw-prefix "210z" [r3])
+ (define-key sun-raw-prefix "213z" [r6])
+ (define-key sun-raw-prefix "214z" [r7])
+ (define-key sun-raw-prefix "216z" [r9])
+ (define-key sun-raw-prefix "218z" [r11])
+ (define-key sun-raw-prefix "220z" [r13])
+ (define-key sun-raw-prefix "222z" [r15])
+ (define-key sun-raw-prefix "193z" [redo])
+ (define-key sun-raw-prefix "194z" [props])
+ (define-key sun-raw-prefix "195z" [undo])
+ ;; (define-key sun-raw-prefix "196z" 'ignore) ; Expose-down
+ ;; (define-key sun-raw-prefix "197z" [put])
+ ;; (define-key sun-raw-prefix "198z" 'ignore) ; Open-down
+ ;; (define-key sun-raw-prefix "199z" [get])
+ (define-key sun-raw-prefix "200z" [find])
+ ;; (define-key sun-raw-prefix "201z" 'kill-region-and-unmark) ; Delete
+ (define-key sun-raw-prefix "224z" [f1])
+ (define-key sun-raw-prefix "225z" [f2])
+ (define-key sun-raw-prefix "226z" [f3])
+ (define-key sun-raw-prefix "227z" [f4])
+ (define-key sun-raw-prefix "228z" [f5])
+ (define-key sun-raw-prefix "229z" [f6])
+ (define-key sun-raw-prefix "230z" [f7])
+ (define-key sun-raw-prefix "231z" [f8])
+ (define-key sun-raw-prefix "232z" [f9])
+ (define-key sun-raw-prefix "233z" [f10])
+ (define-key sun-raw-prefix "234z" [f11])
+ (define-key sun-raw-prefix "235z" [f12])
+ (define-key sun-raw-prefix "A" [up]) ; R8
+ (define-key sun-raw-prefix "B" [down]) ; R14
+ (define-key sun-raw-prefix "C" [right]) ; R12
+ (define-key sun-raw-prefix "D" [left]) ; R10
+
+ (global-set-key [r3] 'backward-page)
+ (global-set-key [r6] 'forward-page)
+ (global-set-key [r7] 'beginning-of-buffer)
+ (global-set-key [r9] 'scroll-down)
+ (global-set-key [r11] 'recenter)
+ (global-set-key [r13] 'end-of-buffer)
+ (global-set-key [r15] 'scroll-up)
+ (global-set-key [redo] 'redraw-display) ;FIXME: collides with default.
+ (global-set-key [props] 'list-buffers)
+ (global-set-key [put] 'sun-select-region)
+ (global-set-key [get] 'sun-yank-selection)
+ (global-set-key [find] 'exchange-point-and-mark)
+ (global-set-key [f3] 'scroll-down-in-place)
+ (global-set-key [f4] 'scroll-up-in-place)
+ (global-set-key [f6] 'shrink-window)
+ (global-set-key [f7] 'enlarge-window)
+
+ (when sun-raw-prefix-hooks
+ (message "sun-raw-prefix-hooks is obsolete! Use term-setup-hook instead!")
+ (let ((hooks sun-raw-prefix-hooks))
+ (while hooks
+ (eval (car hooks))
+ (setq hooks (cdr hooks)))))
+
+ (define-key suntool-map "gr" 'beginning-of-buffer) ; r7
+ (define-key suntool-map "iR" 'backward-page) ; R9
+ (define-key suntool-map "ir" 'scroll-down) ; r9
+ (define-key suntool-map "kr" 'recenter) ; r11
+ (define-key suntool-map "mr" 'end-of-buffer) ; r13
+ (define-key suntool-map "oR" 'forward-page) ; R15
+ (define-key suntool-map "or" 'scroll-up) ; r15
+ (define-key suntool-map "b\M-L" 'rerun-prev-command) ; M-AGAIN
+ (define-key suntool-map "b\M-l" 'prev-complex-command) ; M-Again
+ (define-key suntool-map "bl" 'redraw-display) ; Again
+ (define-key suntool-map "cl" 'list-buffers) ; Props
+ (define-key suntool-map "dl" 'undo) ; Undo
+ (define-key suntool-map "el" 'ignore) ; Expose-Open
+ (define-key suntool-map "fl" 'sun-select-region) ; Put
+ (define-key suntool-map "f," 'copy-region-as-kill) ; C-Put
+ (define-key suntool-map "gl" 'ignore) ; Open-Open
+ (define-key suntool-map "hl" 'sun-yank-selection) ; Get
+ (define-key suntool-map "h," 'yank) ; C-Get
+ (define-key suntool-map "il" 'research-forward) ; Find
+ (define-key suntool-map "i," 're-search-forward) ; C-Find
+ (define-key suntool-map "i\M-l" 'research-backward) ; M-Find
+ (define-key suntool-map "i\M-," 're-search-backward) ; C-M-Find
+
+ (define-key suntool-map "jL" 'yank) ; DELETE
+ (define-key suntool-map "jl" 'kill-region-and-unmark) ; Delete
+ (define-key suntool-map "j\M-l" 'exchange-point-and-mark) ; M-Delete
+ (define-key suntool-map "j,"
+ (lambda () (interactive) (pop-mark))) ; C-Delete
+
+ (define-key suntool-map "fT" 'shrink-window-horizontally) ; T6
+ (define-key suntool-map "gT" 'enlarge-window-horizontally) ; T7
+ (define-key suntool-map "ft" 'shrink-window) ; t6
+ (define-key suntool-map "gt" 'enlarge-window) ; t7
+ (define-key suntool-map "cT" (lambda (n) (interactive "p") (scroll-down n)))
+ (define-key suntool-map "dT" (lambda (n) (interactive "p") (scroll-up n)))
+ (define-key suntool-map "ct" 'scroll-down-in-place) ; t3
+ (define-key suntool-map "dt" 'scroll-up-in-place) ; t4
+ (define-key ctl-x-map "*" suntool-map)
+
+ (when suntool-map-hooks
+ (message "suntool-map-hooks is obsolete! Use term-setup-hook instead!")
+ (let ((hooks suntool-map-hooks))
+ (while hooks
+ (eval (car hooks))
+ (setq hooks (cdr hooks)))))
+
+ (define-key ctl-x-map "\C-@" 'sun-mouse-once))
+
(defun emacstool-init ()
"Set up Emacstool window, if you know you are in an emacstool."
;; Make sure sun-mouse and sun-fns are loaded.
@@ -272,7 +278,6 @@
(interactive)
(emacstool-init)
(sun-mouse-handler)) ; Now, execute this mouse blip.
-(define-key ctl-x-map "\C-@" 'sun-mouse-once)
;;; arch-tag: db761d47-fd7d-42b4-aae1-04fa116b6ba6
;;; sun.el ends here