Mercurial > emacs
annotate lisp/term/sun.el @ 78498:2c1650eb5a96
(nil and t): Do not use `iff' in documentation.
author | Glenn Morris <rgm@gnu.org> |
---|---|
date | Wed, 08 Aug 2007 07:41:51 +0000 |
parents | 030ae62d5c57 |
children | f1713f61ee49 65663fcd2caa f55f9811f5d7 |
rev | line source |
---|---|
17517 | 1 ;;; sun.el --- keybinding for standard default sunterm keys |
2140
c049f2ca31f6
Added headers, removed function-key bindings.
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
498
diff
changeset
|
2 |
64701
34bd8e434dd7
Update years in copyright notice; nfc.
Thien-Thi Nguyen <ttn@gnuvola.org>
parents:
64651
diff
changeset
|
3 ;; Copyright (C) 1987, 2001, 2002, 2003, 2004, |
75347 | 4 ;; 2005, 2006, 2007 Free Software Foundation, Inc. |
14170 | 5 |
2140
c049f2ca31f6
Added headers, removed function-key bindings.
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
498
diff
changeset
|
6 ;; Author: Jeff Peck <peck@sun.com> |
c049f2ca31f6
Added headers, removed function-key bindings.
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
498
diff
changeset
|
7 ;; Keywords: terminals |
c049f2ca31f6
Added headers, removed function-key bindings.
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
498
diff
changeset
|
8 |
14170 | 9 ;; This file is part of GNU Emacs. |
10 | |
11 ;; GNU Emacs is free software; you can redistribute it and/or modify | |
12 ;; it under the terms of the GNU General Public License as published by | |
78226
030ae62d5c57
Switch license to GPLv3 or later.
Glenn Morris <rgm@gnu.org>
parents:
75347
diff
changeset
|
13 ;; the Free Software Foundation; either version 3, or (at your option) |
14170 | 14 ;; any later version. |
466 | 15 |
14170 | 16 ;; GNU Emacs is distributed in the hope that it will be useful, |
17 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of | |
18 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
19 ;; GNU General Public License for more details. | |
20 | |
21 ;; You should have received a copy of the GNU General Public License | |
22 ;; along with GNU Emacs; see the file COPYING. If not, write to the | |
64084 | 23 ;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
24 ;; Boston, MA 02110-1301, USA. | |
466 | 25 |
2140
c049f2ca31f6
Added headers, removed function-key bindings.
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
498
diff
changeset
|
26 ;;; Commentary: |
466 | 27 |
28 ;; The function key sequences for the console have been converted for | |
29 ;; use with function-key-map, but the *tool stuff hasn't been touched. | |
30 | |
2140
c049f2ca31f6
Added headers, removed function-key bindings.
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
498
diff
changeset
|
31 ;;; Code: |
466 | 32 |
33 (defun scroll-down-in-place (n) | |
34 (interactive "p") | |
35 (previous-line n) | |
36 (scroll-down n)) | |
37 | |
38 (defun scroll-up-in-place (n) | |
39 (interactive "p") | |
40 (next-line n) | |
41 (scroll-up n)) | |
42 | |
43 (defun kill-region-and-unmark (beg end) | |
44 "Like kill-region, but pops the mark [which equals point, anyway.]" | |
45 (interactive "r") | |
46 (kill-region beg end) | |
47 (setq this-command 'kill-region-and-unmark) | |
48 (set-mark-command t)) | |
49 | |
50 (defun select-previous-complex-command () | |
51 "Select Previous-complex-command" | |
52 (interactive) | |
53 (if (zerop (minibuffer-depth)) | |
54 (repeat-complex-command 1) | |
38475
916f157c7118
(ignore-key, sun-esc-bracket, meta-flag): Remove.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
17517
diff
changeset
|
55 ;; FIXME: this function does not seem to exist. -stef'01 |
466 | 56 (previous-complex-command 1))) |
57 | |
58 (defun rerun-prev-command () | |
59 "Repeat Previous-complex-command." | |
60 (interactive) | |
61 (eval (nth 0 command-history))) | |
62 | |
63 (defvar grep-arg nil "Default arg for RE-search") | |
64 (defun grep-arg () | |
65 (if (memq last-command '(research-forward research-backward)) grep-arg | |
66 (let* ((command (car command-history)) | |
67 (command-name (symbol-name (car command))) | |
68 (search-arg (car (cdr command))) | |
49599
5ade352e8d1c
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
38475
diff
changeset
|
69 (search-command |
466 | 70 (and command-name (string-match "search" command-name))) |
71 ) | |
72 (if (and search-command (stringp search-arg)) (setq grep-arg search-arg) | |
49599
5ade352e8d1c
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
38475
diff
changeset
|
73 (setq search-command this-command |
466 | 74 grep-arg (read-string "REsearch: " grep-arg) |
75 this-command search-command) | |
76 grep-arg)))) | |
77 | |
78 (defun research-forward () | |
79 "Repeat RE search forward." | |
80 (interactive) | |
81 (re-search-forward (grep-arg))) | |
82 | |
83 (defun research-backward () | |
84 "Repeat RE search backward." | |
85 (interactive) | |
86 (re-search-backward (grep-arg))) | |
87 | |
38475
916f157c7118
(ignore-key, sun-esc-bracket, meta-flag): Remove.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
17517
diff
changeset
|
88 ;; |
916f157c7118
(ignore-key, sun-esc-bracket, meta-flag): Remove.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
17517
diff
changeset
|
89 ;; handle sun's extra function keys |
916f157c7118
(ignore-key, sun-esc-bracket, meta-flag): Remove.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
17517
diff
changeset
|
90 ;; this version for those who run with standard .ttyswrc and no emacstool |
916f157c7118
(ignore-key, sun-esc-bracket, meta-flag): Remove.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
17517
diff
changeset
|
91 ;; |
49599
5ade352e8d1c
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
38475
diff
changeset
|
92 ;; sunview picks up expose and open on the way UP, |
38475
916f157c7118
(ignore-key, sun-esc-bracket, meta-flag): Remove.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
17517
diff
changeset
|
93 ;; so we ignore them on the way down |
916f157c7118
(ignore-key, sun-esc-bracket, meta-flag): Remove.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
17517
diff
changeset
|
94 ;; |
466 | 95 |
5029
c02c789d39d7
(sun-raw-prefix): Make this just a variable, not a function name.
Richard M. Stallman <rms@gnu.org>
parents:
3287
diff
changeset
|
96 (defvar sun-raw-prefix (make-sparse-keymap)) |
466 | 97 |
38475
916f157c7118
(ignore-key, sun-esc-bracket, meta-flag): Remove.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
17517
diff
changeset
|
98 ;; Since .emacs gets loaded before this file, a hook is supplied |
916f157c7118
(ignore-key, sun-esc-bracket, meta-flag): Remove.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
17517
diff
changeset
|
99 ;; for you to put your own bindings in. |
466 | 100 |
498 | 101 (defvar sun-raw-prefix-hooks nil |
102 "List of forms to evaluate after setting sun-raw-prefix.") | |
466 | 103 |
104 | |
2140
c049f2ca31f6
Added headers, removed function-key bindings.
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
498
diff
changeset
|
105 ;;; This section adds definitions for the emacstool users |
38475
916f157c7118
(ignore-key, sun-esc-bracket, meta-flag): Remove.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
17517
diff
changeset
|
106 ;; emacstool event filter converts function keys to C-x*{c}{lrt} |
916f157c7118
(ignore-key, sun-esc-bracket, meta-flag): Remove.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
17517
diff
changeset
|
107 ;; |
916f157c7118
(ignore-key, sun-esc-bracket, meta-flag): Remove.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
17517
diff
changeset
|
108 ;; for example the Open key (L7) would be encoded as "\C-x*gl" |
916f157c7118
(ignore-key, sun-esc-bracket, meta-flag): Remove.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
17517
diff
changeset
|
109 ;; the control, meta, and shift keys modify the character {lrt} |
916f157c7118
(ignore-key, sun-esc-bracket, meta-flag): Remove.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
17517
diff
changeset
|
110 ;; note that (unshifted) C-l is ",", C-r is "2", and C-t is "4" |
916f157c7118
(ignore-key, sun-esc-bracket, meta-flag): Remove.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
17517
diff
changeset
|
111 ;; |
916f157c7118
(ignore-key, sun-esc-bracket, meta-flag): Remove.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
17517
diff
changeset
|
112 ;; {c} is [a-j] for LEFT, [a-i] for TOP, [a-o] for RIGHT. |
916f157c7118
(ignore-key, sun-esc-bracket, meta-flag): Remove.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
17517
diff
changeset
|
113 ;; A higher level insists on encoding {h,j,l,n}{r} (the arrow keys) |
49599
5ade352e8d1c
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
38475
diff
changeset
|
114 ;; as ANSI escape sequences. Use the shell command |
38475
916f157c7118
(ignore-key, sun-esc-bracket, meta-flag): Remove.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
17517
diff
changeset
|
115 ;; % setkeys noarrows |
916f157c7118
(ignore-key, sun-esc-bracket, meta-flag): Remove.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
17517
diff
changeset
|
116 ;; if you want these to come through for emacstool. |
916f157c7118
(ignore-key, sun-esc-bracket, meta-flag): Remove.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
17517
diff
changeset
|
117 ;; |
49599
5ade352e8d1c
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
38475
diff
changeset
|
118 ;; If you are not using EmacsTool, |
38475
916f157c7118
(ignore-key, sun-esc-bracket, meta-flag): Remove.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
17517
diff
changeset
|
119 ;; you can also use this by creating a .ttyswrc file to do the conversion. |
916f157c7118
(ignore-key, sun-esc-bracket, meta-flag): Remove.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
17517
diff
changeset
|
120 ;; but it won't include the CONTROL, META, or SHIFT keys! |
916f157c7118
(ignore-key, sun-esc-bracket, meta-flag): Remove.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
17517
diff
changeset
|
121 ;; |
916f157c7118
(ignore-key, sun-esc-bracket, meta-flag): Remove.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
17517
diff
changeset
|
122 ;; Important to define SHIFTed sequence before matching unshifted sequence. |
916f157c7118
(ignore-key, sun-esc-bracket, meta-flag): Remove.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
17517
diff
changeset
|
123 ;; (talk about bletcherous old uppercase terminal conventions!*$#@&%*&#$%) |
916f157c7118
(ignore-key, sun-esc-bracket, meta-flag): Remove.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
17517
diff
changeset
|
124 ;; this is worse than C-S/C-Q flow control anyday! |
916f157c7118
(ignore-key, sun-esc-bracket, meta-flag): Remove.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
17517
diff
changeset
|
125 ;; Do *YOU* run in capslock mode? |
916f157c7118
(ignore-key, sun-esc-bracket, meta-flag): Remove.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
17517
diff
changeset
|
126 ;; |
466 | 127 |
38475
916f157c7118
(ignore-key, sun-esc-bracket, meta-flag): Remove.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
17517
diff
changeset
|
128 ;; Note: al, el and gl are trapped by EmacsTool, so they never make it here. |
466 | 129 |
130 (defvar suntool-map (make-sparse-keymap) | |
131 "*Keymap for Emacstool bindings.") | |
132 | |
133 | |
38475
916f157c7118
(ignore-key, sun-esc-bracket, meta-flag): Remove.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
17517
diff
changeset
|
134 ;; Since .emacs gets loaded before this file, a hook is supplied |
916f157c7118
(ignore-key, sun-esc-bracket, meta-flag): Remove.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
17517
diff
changeset
|
135 ;; for you to put your own bindings in. |
466 | 136 |
137 (defvar suntool-map-hooks nil | |
138 "List of forms to evaluate after setting suntool-map.") | |
139 | |
38475
916f157c7118
(ignore-key, sun-esc-bracket, meta-flag): Remove.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
17517
diff
changeset
|
140 ;; |
916f157c7118
(ignore-key, sun-esc-bracket, meta-flag): Remove.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
17517
diff
changeset
|
141 ;; If running under emacstool, arrange to call suspend-emacstool |
916f157c7118
(ignore-key, sun-esc-bracket, meta-flag): Remove.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
17517
diff
changeset
|
142 ;; instead of suspend-emacs. |
916f157c7118
(ignore-key, sun-esc-bracket, meta-flag): Remove.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
17517
diff
changeset
|
143 ;; |
916f157c7118
(ignore-key, sun-esc-bracket, meta-flag): Remove.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
17517
diff
changeset
|
144 ;; First mouse blip is a clue that we are in emacstool. |
916f157c7118
(ignore-key, sun-esc-bracket, meta-flag): Remove.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
17517
diff
changeset
|
145 ;; |
916f157c7118
(ignore-key, sun-esc-bracket, meta-flag): Remove.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
17517
diff
changeset
|
146 ;; C-x C-@ is the mouse command prefix. |
466 | 147 |
49599
5ade352e8d1c
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
38475
diff
changeset
|
148 (autoload 'sun-mouse-handler "sun-mouse" |
466 | 149 "Sun Emacstool handler for mouse blips (not loaded)." t) |
150 | |
64651
af1c58687bdd
* term/apollo.el (terminal-init-apollo): New function containing
Dan Nicolaescu <dann@ics.uci.edu>
parents:
64084
diff
changeset
|
151 (defun terminal-init-sun () |
af1c58687bdd
* term/apollo.el (terminal-init-apollo): New function containing
Dan Nicolaescu <dann@ics.uci.edu>
parents:
64084
diff
changeset
|
152 "Terminal initialization function for sun." |
af1c58687bdd
* term/apollo.el (terminal-init-apollo): New function containing
Dan Nicolaescu <dann@ics.uci.edu>
parents:
64084
diff
changeset
|
153 (define-key function-key-map "\e[" sun-raw-prefix) |
af1c58687bdd
* term/apollo.el (terminal-init-apollo): New function containing
Dan Nicolaescu <dann@ics.uci.edu>
parents:
64084
diff
changeset
|
154 |
af1c58687bdd
* term/apollo.el (terminal-init-apollo): New function containing
Dan Nicolaescu <dann@ics.uci.edu>
parents:
64084
diff
changeset
|
155 (define-key sun-raw-prefix "210z" [r3]) |
af1c58687bdd
* term/apollo.el (terminal-init-apollo): New function containing
Dan Nicolaescu <dann@ics.uci.edu>
parents:
64084
diff
changeset
|
156 (define-key sun-raw-prefix "213z" [r6]) |
af1c58687bdd
* term/apollo.el (terminal-init-apollo): New function containing
Dan Nicolaescu <dann@ics.uci.edu>
parents:
64084
diff
changeset
|
157 (define-key sun-raw-prefix "214z" [r7]) |
af1c58687bdd
* term/apollo.el (terminal-init-apollo): New function containing
Dan Nicolaescu <dann@ics.uci.edu>
parents:
64084
diff
changeset
|
158 (define-key sun-raw-prefix "216z" [r9]) |
af1c58687bdd
* term/apollo.el (terminal-init-apollo): New function containing
Dan Nicolaescu <dann@ics.uci.edu>
parents:
64084
diff
changeset
|
159 (define-key sun-raw-prefix "218z" [r11]) |
af1c58687bdd
* term/apollo.el (terminal-init-apollo): New function containing
Dan Nicolaescu <dann@ics.uci.edu>
parents:
64084
diff
changeset
|
160 (define-key sun-raw-prefix "220z" [r13]) |
af1c58687bdd
* term/apollo.el (terminal-init-apollo): New function containing
Dan Nicolaescu <dann@ics.uci.edu>
parents:
64084
diff
changeset
|
161 (define-key sun-raw-prefix "222z" [r15]) |
af1c58687bdd
* term/apollo.el (terminal-init-apollo): New function containing
Dan Nicolaescu <dann@ics.uci.edu>
parents:
64084
diff
changeset
|
162 (define-key sun-raw-prefix "193z" [redo]) |
af1c58687bdd
* term/apollo.el (terminal-init-apollo): New function containing
Dan Nicolaescu <dann@ics.uci.edu>
parents:
64084
diff
changeset
|
163 (define-key sun-raw-prefix "194z" [props]) |
af1c58687bdd
* term/apollo.el (terminal-init-apollo): New function containing
Dan Nicolaescu <dann@ics.uci.edu>
parents:
64084
diff
changeset
|
164 (define-key sun-raw-prefix "195z" [undo]) |
af1c58687bdd
* term/apollo.el (terminal-init-apollo): New function containing
Dan Nicolaescu <dann@ics.uci.edu>
parents:
64084
diff
changeset
|
165 ;; (define-key sun-raw-prefix "196z" 'ignore) ; Expose-down |
af1c58687bdd
* term/apollo.el (terminal-init-apollo): New function containing
Dan Nicolaescu <dann@ics.uci.edu>
parents:
64084
diff
changeset
|
166 ;; (define-key sun-raw-prefix "197z" [put]) |
af1c58687bdd
* term/apollo.el (terminal-init-apollo): New function containing
Dan Nicolaescu <dann@ics.uci.edu>
parents:
64084
diff
changeset
|
167 ;; (define-key sun-raw-prefix "198z" 'ignore) ; Open-down |
af1c58687bdd
* term/apollo.el (terminal-init-apollo): New function containing
Dan Nicolaescu <dann@ics.uci.edu>
parents:
64084
diff
changeset
|
168 ;; (define-key sun-raw-prefix "199z" [get]) |
af1c58687bdd
* term/apollo.el (terminal-init-apollo): New function containing
Dan Nicolaescu <dann@ics.uci.edu>
parents:
64084
diff
changeset
|
169 (define-key sun-raw-prefix "200z" [find]) |
af1c58687bdd
* term/apollo.el (terminal-init-apollo): New function containing
Dan Nicolaescu <dann@ics.uci.edu>
parents:
64084
diff
changeset
|
170 ;; (define-key sun-raw-prefix "201z" 'kill-region-and-unmark) ; Delete |
af1c58687bdd
* term/apollo.el (terminal-init-apollo): New function containing
Dan Nicolaescu <dann@ics.uci.edu>
parents:
64084
diff
changeset
|
171 (define-key sun-raw-prefix "224z" [f1]) |
af1c58687bdd
* term/apollo.el (terminal-init-apollo): New function containing
Dan Nicolaescu <dann@ics.uci.edu>
parents:
64084
diff
changeset
|
172 (define-key sun-raw-prefix "225z" [f2]) |
af1c58687bdd
* term/apollo.el (terminal-init-apollo): New function containing
Dan Nicolaescu <dann@ics.uci.edu>
parents:
64084
diff
changeset
|
173 (define-key sun-raw-prefix "226z" [f3]) |
af1c58687bdd
* term/apollo.el (terminal-init-apollo): New function containing
Dan Nicolaescu <dann@ics.uci.edu>
parents:
64084
diff
changeset
|
174 (define-key sun-raw-prefix "227z" [f4]) |
af1c58687bdd
* term/apollo.el (terminal-init-apollo): New function containing
Dan Nicolaescu <dann@ics.uci.edu>
parents:
64084
diff
changeset
|
175 (define-key sun-raw-prefix "228z" [f5]) |
af1c58687bdd
* term/apollo.el (terminal-init-apollo): New function containing
Dan Nicolaescu <dann@ics.uci.edu>
parents:
64084
diff
changeset
|
176 (define-key sun-raw-prefix "229z" [f6]) |
af1c58687bdd
* term/apollo.el (terminal-init-apollo): New function containing
Dan Nicolaescu <dann@ics.uci.edu>
parents:
64084
diff
changeset
|
177 (define-key sun-raw-prefix "230z" [f7]) |
af1c58687bdd
* term/apollo.el (terminal-init-apollo): New function containing
Dan Nicolaescu <dann@ics.uci.edu>
parents:
64084
diff
changeset
|
178 (define-key sun-raw-prefix "231z" [f8]) |
af1c58687bdd
* term/apollo.el (terminal-init-apollo): New function containing
Dan Nicolaescu <dann@ics.uci.edu>
parents:
64084
diff
changeset
|
179 (define-key sun-raw-prefix "232z" [f9]) |
af1c58687bdd
* term/apollo.el (terminal-init-apollo): New function containing
Dan Nicolaescu <dann@ics.uci.edu>
parents:
64084
diff
changeset
|
180 (define-key sun-raw-prefix "233z" [f10]) |
af1c58687bdd
* term/apollo.el (terminal-init-apollo): New function containing
Dan Nicolaescu <dann@ics.uci.edu>
parents:
64084
diff
changeset
|
181 (define-key sun-raw-prefix "234z" [f11]) |
af1c58687bdd
* term/apollo.el (terminal-init-apollo): New function containing
Dan Nicolaescu <dann@ics.uci.edu>
parents:
64084
diff
changeset
|
182 (define-key sun-raw-prefix "235z" [f12]) |
af1c58687bdd
* term/apollo.el (terminal-init-apollo): New function containing
Dan Nicolaescu <dann@ics.uci.edu>
parents:
64084
diff
changeset
|
183 (define-key sun-raw-prefix "A" [up]) ; R8 |
af1c58687bdd
* term/apollo.el (terminal-init-apollo): New function containing
Dan Nicolaescu <dann@ics.uci.edu>
parents:
64084
diff
changeset
|
184 (define-key sun-raw-prefix "B" [down]) ; R14 |
af1c58687bdd
* term/apollo.el (terminal-init-apollo): New function containing
Dan Nicolaescu <dann@ics.uci.edu>
parents:
64084
diff
changeset
|
185 (define-key sun-raw-prefix "C" [right]) ; R12 |
af1c58687bdd
* term/apollo.el (terminal-init-apollo): New function containing
Dan Nicolaescu <dann@ics.uci.edu>
parents:
64084
diff
changeset
|
186 (define-key sun-raw-prefix "D" [left]) ; R10 |
af1c58687bdd
* term/apollo.el (terminal-init-apollo): New function containing
Dan Nicolaescu <dann@ics.uci.edu>
parents:
64084
diff
changeset
|
187 |
af1c58687bdd
* term/apollo.el (terminal-init-apollo): New function containing
Dan Nicolaescu <dann@ics.uci.edu>
parents:
64084
diff
changeset
|
188 (global-set-key [r3] 'backward-page) |
af1c58687bdd
* term/apollo.el (terminal-init-apollo): New function containing
Dan Nicolaescu <dann@ics.uci.edu>
parents:
64084
diff
changeset
|
189 (global-set-key [r6] 'forward-page) |
af1c58687bdd
* term/apollo.el (terminal-init-apollo): New function containing
Dan Nicolaescu <dann@ics.uci.edu>
parents:
64084
diff
changeset
|
190 (global-set-key [r7] 'beginning-of-buffer) |
af1c58687bdd
* term/apollo.el (terminal-init-apollo): New function containing
Dan Nicolaescu <dann@ics.uci.edu>
parents:
64084
diff
changeset
|
191 (global-set-key [r9] 'scroll-down) |
af1c58687bdd
* term/apollo.el (terminal-init-apollo): New function containing
Dan Nicolaescu <dann@ics.uci.edu>
parents:
64084
diff
changeset
|
192 (global-set-key [r11] 'recenter) |
af1c58687bdd
* term/apollo.el (terminal-init-apollo): New function containing
Dan Nicolaescu <dann@ics.uci.edu>
parents:
64084
diff
changeset
|
193 (global-set-key [r13] 'end-of-buffer) |
af1c58687bdd
* term/apollo.el (terminal-init-apollo): New function containing
Dan Nicolaescu <dann@ics.uci.edu>
parents:
64084
diff
changeset
|
194 (global-set-key [r15] 'scroll-up) |
af1c58687bdd
* term/apollo.el (terminal-init-apollo): New function containing
Dan Nicolaescu <dann@ics.uci.edu>
parents:
64084
diff
changeset
|
195 (global-set-key [redo] 'redraw-display) ;FIXME: collides with default. |
af1c58687bdd
* term/apollo.el (terminal-init-apollo): New function containing
Dan Nicolaescu <dann@ics.uci.edu>
parents:
64084
diff
changeset
|
196 (global-set-key [props] 'list-buffers) |
af1c58687bdd
* term/apollo.el (terminal-init-apollo): New function containing
Dan Nicolaescu <dann@ics.uci.edu>
parents:
64084
diff
changeset
|
197 (global-set-key [put] 'sun-select-region) |
af1c58687bdd
* term/apollo.el (terminal-init-apollo): New function containing
Dan Nicolaescu <dann@ics.uci.edu>
parents:
64084
diff
changeset
|
198 (global-set-key [get] 'sun-yank-selection) |
af1c58687bdd
* term/apollo.el (terminal-init-apollo): New function containing
Dan Nicolaescu <dann@ics.uci.edu>
parents:
64084
diff
changeset
|
199 (global-set-key [find] 'exchange-point-and-mark) |
af1c58687bdd
* term/apollo.el (terminal-init-apollo): New function containing
Dan Nicolaescu <dann@ics.uci.edu>
parents:
64084
diff
changeset
|
200 (global-set-key [f3] 'scroll-down-in-place) |
af1c58687bdd
* term/apollo.el (terminal-init-apollo): New function containing
Dan Nicolaescu <dann@ics.uci.edu>
parents:
64084
diff
changeset
|
201 (global-set-key [f4] 'scroll-up-in-place) |
af1c58687bdd
* term/apollo.el (terminal-init-apollo): New function containing
Dan Nicolaescu <dann@ics.uci.edu>
parents:
64084
diff
changeset
|
202 (global-set-key [f6] 'shrink-window) |
af1c58687bdd
* term/apollo.el (terminal-init-apollo): New function containing
Dan Nicolaescu <dann@ics.uci.edu>
parents:
64084
diff
changeset
|
203 (global-set-key [f7] 'enlarge-window) |
af1c58687bdd
* term/apollo.el (terminal-init-apollo): New function containing
Dan Nicolaescu <dann@ics.uci.edu>
parents:
64084
diff
changeset
|
204 |
af1c58687bdd
* term/apollo.el (terminal-init-apollo): New function containing
Dan Nicolaescu <dann@ics.uci.edu>
parents:
64084
diff
changeset
|
205 (when sun-raw-prefix-hooks |
af1c58687bdd
* term/apollo.el (terminal-init-apollo): New function containing
Dan Nicolaescu <dann@ics.uci.edu>
parents:
64084
diff
changeset
|
206 (message "sun-raw-prefix-hooks is obsolete! Use term-setup-hook instead!") |
af1c58687bdd
* term/apollo.el (terminal-init-apollo): New function containing
Dan Nicolaescu <dann@ics.uci.edu>
parents:
64084
diff
changeset
|
207 (let ((hooks sun-raw-prefix-hooks)) |
af1c58687bdd
* term/apollo.el (terminal-init-apollo): New function containing
Dan Nicolaescu <dann@ics.uci.edu>
parents:
64084
diff
changeset
|
208 (while hooks |
af1c58687bdd
* term/apollo.el (terminal-init-apollo): New function containing
Dan Nicolaescu <dann@ics.uci.edu>
parents:
64084
diff
changeset
|
209 (eval (car hooks)) |
af1c58687bdd
* term/apollo.el (terminal-init-apollo): New function containing
Dan Nicolaescu <dann@ics.uci.edu>
parents:
64084
diff
changeset
|
210 (setq hooks (cdr hooks))))) |
af1c58687bdd
* term/apollo.el (terminal-init-apollo): New function containing
Dan Nicolaescu <dann@ics.uci.edu>
parents:
64084
diff
changeset
|
211 |
af1c58687bdd
* term/apollo.el (terminal-init-apollo): New function containing
Dan Nicolaescu <dann@ics.uci.edu>
parents:
64084
diff
changeset
|
212 (define-key suntool-map "gr" 'beginning-of-buffer) ; r7 |
af1c58687bdd
* term/apollo.el (terminal-init-apollo): New function containing
Dan Nicolaescu <dann@ics.uci.edu>
parents:
64084
diff
changeset
|
213 (define-key suntool-map "iR" 'backward-page) ; R9 |
af1c58687bdd
* term/apollo.el (terminal-init-apollo): New function containing
Dan Nicolaescu <dann@ics.uci.edu>
parents:
64084
diff
changeset
|
214 (define-key suntool-map "ir" 'scroll-down) ; r9 |
af1c58687bdd
* term/apollo.el (terminal-init-apollo): New function containing
Dan Nicolaescu <dann@ics.uci.edu>
parents:
64084
diff
changeset
|
215 (define-key suntool-map "kr" 'recenter) ; r11 |
af1c58687bdd
* term/apollo.el (terminal-init-apollo): New function containing
Dan Nicolaescu <dann@ics.uci.edu>
parents:
64084
diff
changeset
|
216 (define-key suntool-map "mr" 'end-of-buffer) ; r13 |
af1c58687bdd
* term/apollo.el (terminal-init-apollo): New function containing
Dan Nicolaescu <dann@ics.uci.edu>
parents:
64084
diff
changeset
|
217 (define-key suntool-map "oR" 'forward-page) ; R15 |
af1c58687bdd
* term/apollo.el (terminal-init-apollo): New function containing
Dan Nicolaescu <dann@ics.uci.edu>
parents:
64084
diff
changeset
|
218 (define-key suntool-map "or" 'scroll-up) ; r15 |
af1c58687bdd
* term/apollo.el (terminal-init-apollo): New function containing
Dan Nicolaescu <dann@ics.uci.edu>
parents:
64084
diff
changeset
|
219 (define-key suntool-map "b\M-L" 'rerun-prev-command) ; M-AGAIN |
af1c58687bdd
* term/apollo.el (terminal-init-apollo): New function containing
Dan Nicolaescu <dann@ics.uci.edu>
parents:
64084
diff
changeset
|
220 (define-key suntool-map "b\M-l" 'prev-complex-command) ; M-Again |
af1c58687bdd
* term/apollo.el (terminal-init-apollo): New function containing
Dan Nicolaescu <dann@ics.uci.edu>
parents:
64084
diff
changeset
|
221 (define-key suntool-map "bl" 'redraw-display) ; Again |
af1c58687bdd
* term/apollo.el (terminal-init-apollo): New function containing
Dan Nicolaescu <dann@ics.uci.edu>
parents:
64084
diff
changeset
|
222 (define-key suntool-map "cl" 'list-buffers) ; Props |
af1c58687bdd
* term/apollo.el (terminal-init-apollo): New function containing
Dan Nicolaescu <dann@ics.uci.edu>
parents:
64084
diff
changeset
|
223 (define-key suntool-map "dl" 'undo) ; Undo |
af1c58687bdd
* term/apollo.el (terminal-init-apollo): New function containing
Dan Nicolaescu <dann@ics.uci.edu>
parents:
64084
diff
changeset
|
224 (define-key suntool-map "el" 'ignore) ; Expose-Open |
af1c58687bdd
* term/apollo.el (terminal-init-apollo): New function containing
Dan Nicolaescu <dann@ics.uci.edu>
parents:
64084
diff
changeset
|
225 (define-key suntool-map "fl" 'sun-select-region) ; Put |
af1c58687bdd
* term/apollo.el (terminal-init-apollo): New function containing
Dan Nicolaescu <dann@ics.uci.edu>
parents:
64084
diff
changeset
|
226 (define-key suntool-map "f," 'copy-region-as-kill) ; C-Put |
af1c58687bdd
* term/apollo.el (terminal-init-apollo): New function containing
Dan Nicolaescu <dann@ics.uci.edu>
parents:
64084
diff
changeset
|
227 (define-key suntool-map "gl" 'ignore) ; Open-Open |
af1c58687bdd
* term/apollo.el (terminal-init-apollo): New function containing
Dan Nicolaescu <dann@ics.uci.edu>
parents:
64084
diff
changeset
|
228 (define-key suntool-map "hl" 'sun-yank-selection) ; Get |
af1c58687bdd
* term/apollo.el (terminal-init-apollo): New function containing
Dan Nicolaescu <dann@ics.uci.edu>
parents:
64084
diff
changeset
|
229 (define-key suntool-map "h," 'yank) ; C-Get |
af1c58687bdd
* term/apollo.el (terminal-init-apollo): New function containing
Dan Nicolaescu <dann@ics.uci.edu>
parents:
64084
diff
changeset
|
230 (define-key suntool-map "il" 'research-forward) ; Find |
af1c58687bdd
* term/apollo.el (terminal-init-apollo): New function containing
Dan Nicolaescu <dann@ics.uci.edu>
parents:
64084
diff
changeset
|
231 (define-key suntool-map "i," 're-search-forward) ; C-Find |
af1c58687bdd
* term/apollo.el (terminal-init-apollo): New function containing
Dan Nicolaescu <dann@ics.uci.edu>
parents:
64084
diff
changeset
|
232 (define-key suntool-map "i\M-l" 'research-backward) ; M-Find |
af1c58687bdd
* term/apollo.el (terminal-init-apollo): New function containing
Dan Nicolaescu <dann@ics.uci.edu>
parents:
64084
diff
changeset
|
233 (define-key suntool-map "i\M-," 're-search-backward) ; C-M-Find |
af1c58687bdd
* term/apollo.el (terminal-init-apollo): New function containing
Dan Nicolaescu <dann@ics.uci.edu>
parents:
64084
diff
changeset
|
234 |
af1c58687bdd
* term/apollo.el (terminal-init-apollo): New function containing
Dan Nicolaescu <dann@ics.uci.edu>
parents:
64084
diff
changeset
|
235 (define-key suntool-map "jL" 'yank) ; DELETE |
af1c58687bdd
* term/apollo.el (terminal-init-apollo): New function containing
Dan Nicolaescu <dann@ics.uci.edu>
parents:
64084
diff
changeset
|
236 (define-key suntool-map "jl" 'kill-region-and-unmark) ; Delete |
af1c58687bdd
* term/apollo.el (terminal-init-apollo): New function containing
Dan Nicolaescu <dann@ics.uci.edu>
parents:
64084
diff
changeset
|
237 (define-key suntool-map "j\M-l" 'exchange-point-and-mark) ; M-Delete |
af1c58687bdd
* term/apollo.el (terminal-init-apollo): New function containing
Dan Nicolaescu <dann@ics.uci.edu>
parents:
64084
diff
changeset
|
238 (define-key suntool-map "j," |
af1c58687bdd
* term/apollo.el (terminal-init-apollo): New function containing
Dan Nicolaescu <dann@ics.uci.edu>
parents:
64084
diff
changeset
|
239 (lambda () (interactive) (pop-mark))) ; C-Delete |
af1c58687bdd
* term/apollo.el (terminal-init-apollo): New function containing
Dan Nicolaescu <dann@ics.uci.edu>
parents:
64084
diff
changeset
|
240 |
af1c58687bdd
* term/apollo.el (terminal-init-apollo): New function containing
Dan Nicolaescu <dann@ics.uci.edu>
parents:
64084
diff
changeset
|
241 (define-key suntool-map "fT" 'shrink-window-horizontally) ; T6 |
af1c58687bdd
* term/apollo.el (terminal-init-apollo): New function containing
Dan Nicolaescu <dann@ics.uci.edu>
parents:
64084
diff
changeset
|
242 (define-key suntool-map "gT" 'enlarge-window-horizontally) ; T7 |
af1c58687bdd
* term/apollo.el (terminal-init-apollo): New function containing
Dan Nicolaescu <dann@ics.uci.edu>
parents:
64084
diff
changeset
|
243 (define-key suntool-map "ft" 'shrink-window) ; t6 |
af1c58687bdd
* term/apollo.el (terminal-init-apollo): New function containing
Dan Nicolaescu <dann@ics.uci.edu>
parents:
64084
diff
changeset
|
244 (define-key suntool-map "gt" 'enlarge-window) ; t7 |
af1c58687bdd
* term/apollo.el (terminal-init-apollo): New function containing
Dan Nicolaescu <dann@ics.uci.edu>
parents:
64084
diff
changeset
|
245 (define-key suntool-map "cT" (lambda (n) (interactive "p") (scroll-down n))) |
af1c58687bdd
* term/apollo.el (terminal-init-apollo): New function containing
Dan Nicolaescu <dann@ics.uci.edu>
parents:
64084
diff
changeset
|
246 (define-key suntool-map "dT" (lambda (n) (interactive "p") (scroll-up n))) |
af1c58687bdd
* term/apollo.el (terminal-init-apollo): New function containing
Dan Nicolaescu <dann@ics.uci.edu>
parents:
64084
diff
changeset
|
247 (define-key suntool-map "ct" 'scroll-down-in-place) ; t3 |
af1c58687bdd
* term/apollo.el (terminal-init-apollo): New function containing
Dan Nicolaescu <dann@ics.uci.edu>
parents:
64084
diff
changeset
|
248 (define-key suntool-map "dt" 'scroll-up-in-place) ; t4 |
af1c58687bdd
* term/apollo.el (terminal-init-apollo): New function containing
Dan Nicolaescu <dann@ics.uci.edu>
parents:
64084
diff
changeset
|
249 (define-key ctl-x-map "*" suntool-map) |
af1c58687bdd
* term/apollo.el (terminal-init-apollo): New function containing
Dan Nicolaescu <dann@ics.uci.edu>
parents:
64084
diff
changeset
|
250 |
af1c58687bdd
* term/apollo.el (terminal-init-apollo): New function containing
Dan Nicolaescu <dann@ics.uci.edu>
parents:
64084
diff
changeset
|
251 (when suntool-map-hooks |
af1c58687bdd
* term/apollo.el (terminal-init-apollo): New function containing
Dan Nicolaescu <dann@ics.uci.edu>
parents:
64084
diff
changeset
|
252 (message "suntool-map-hooks is obsolete! Use term-setup-hook instead!") |
af1c58687bdd
* term/apollo.el (terminal-init-apollo): New function containing
Dan Nicolaescu <dann@ics.uci.edu>
parents:
64084
diff
changeset
|
253 (let ((hooks suntool-map-hooks)) |
af1c58687bdd
* term/apollo.el (terminal-init-apollo): New function containing
Dan Nicolaescu <dann@ics.uci.edu>
parents:
64084
diff
changeset
|
254 (while hooks |
af1c58687bdd
* term/apollo.el (terminal-init-apollo): New function containing
Dan Nicolaescu <dann@ics.uci.edu>
parents:
64084
diff
changeset
|
255 (eval (car hooks)) |
af1c58687bdd
* term/apollo.el (terminal-init-apollo): New function containing
Dan Nicolaescu <dann@ics.uci.edu>
parents:
64084
diff
changeset
|
256 (setq hooks (cdr hooks))))) |
64701
34bd8e434dd7
Update years in copyright notice; nfc.
Thien-Thi Nguyen <ttn@gnuvola.org>
parents:
64651
diff
changeset
|
257 |
64651
af1c58687bdd
* term/apollo.el (terminal-init-apollo): New function containing
Dan Nicolaescu <dann@ics.uci.edu>
parents:
64084
diff
changeset
|
258 (define-key ctl-x-map "\C-@" 'sun-mouse-once)) |
af1c58687bdd
* term/apollo.el (terminal-init-apollo): New function containing
Dan Nicolaescu <dann@ics.uci.edu>
parents:
64084
diff
changeset
|
259 |
466 | 260 (defun emacstool-init () |
261 "Set up Emacstool window, if you know you are in an emacstool." | |
262 ;; Make sure sun-mouse and sun-fns are loaded. | |
263 (require 'sun-fns) | |
264 (define-key ctl-x-map "\C-@" 'sun-mouse-handler) | |
265 | |
38475
916f157c7118
(ignore-key, sun-esc-bracket, meta-flag): Remove.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
17517
diff
changeset
|
266 ;; FIXME: this function does not seem to exist either. -stef'01 |
466 | 267 (if (< (sun-window-init) 0) |
268 (message "Not a Sun Window") | |
269 (progn | |
270 (substitute-key-definition 'suspend-emacs 'suspend-emacstool global-map) | |
271 (substitute-key-definition 'suspend-emacs 'suspend-emacstool esc-map) | |
272 (substitute-key-definition 'suspend-emacs 'suspend-emacstool ctl-x-map)) | |
273 (send-string-to-terminal | |
38475
916f157c7118
(ignore-key, sun-esc-bracket, meta-flag): Remove.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
17517
diff
changeset
|
274 (concat "\033]lEmacstool - GNU Emacs " emacs-version "\033\\")))) |
466 | 275 |
276 (defun sun-mouse-once () | |
277 "Converts to emacstool and sun-mouse-handler on first mouse hit." | |
278 (interactive) | |
279 (emacstool-init) | |
38475
916f157c7118
(ignore-key, sun-esc-bracket, meta-flag): Remove.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
17517
diff
changeset
|
280 (sun-mouse-handler)) ; Now, execute this mouse blip. |
2140
c049f2ca31f6
Added headers, removed function-key bindings.
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
498
diff
changeset
|
281 |
52401 | 282 ;;; arch-tag: db761d47-fd7d-42b4-aae1-04fa116b6ba6 |
2140
c049f2ca31f6
Added headers, removed function-key bindings.
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
498
diff
changeset
|
283 ;;; sun.el ends here |