annotate lisp/term/sun.el @ 67470:98e70ddf4e0e

*** empty log message ***
author Eli Zaretskii <eliz@gnu.org>
date Sat, 10 Dec 2005 11:30:33 +0000
parents 34bd8e434dd7
children 067115a6e738 532e0a9335a9 edf295560b5a
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
17517
8f952e921136 Comment change.
Richard M. Stallman <rms@gnu.org>
parents: 14170
diff changeset
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,
34bd8e434dd7 Update years in copyright notice; nfc.
Thien-Thi Nguyen <ttn@gnuvola.org>
parents: 64651
diff changeset
4 ;; 2005 Free Software Foundation, Inc.
14170
23cc3f54e536 Update FSF's office address.
Erik Naggum <erik@naggum.no>
parents: 5029
diff changeset
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
23cc3f54e536 Update FSF's office address.
Erik Naggum <erik@naggum.no>
parents: 5029
diff changeset
9 ;; This file is part of GNU Emacs.
23cc3f54e536 Update FSF's office address.
Erik Naggum <erik@naggum.no>
parents: 5029
diff changeset
10
23cc3f54e536 Update FSF's office address.
Erik Naggum <erik@naggum.no>
parents: 5029
diff changeset
11 ;; GNU Emacs is free software; you can redistribute it and/or modify
23cc3f54e536 Update FSF's office address.
Erik Naggum <erik@naggum.no>
parents: 5029
diff changeset
12 ;; it under the terms of the GNU General Public License as published by
23cc3f54e536 Update FSF's office address.
Erik Naggum <erik@naggum.no>
parents: 5029
diff changeset
13 ;; the Free Software Foundation; either version 2, or (at your option)
23cc3f54e536 Update FSF's office address.
Erik Naggum <erik@naggum.no>
parents: 5029
diff changeset
14 ;; any later version.
466
a5749ca987d0 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
15
14170
23cc3f54e536 Update FSF's office address.
Erik Naggum <erik@naggum.no>
parents: 5029
diff changeset
16 ;; GNU Emacs is distributed in the hope that it will be useful,
23cc3f54e536 Update FSF's office address.
Erik Naggum <erik@naggum.no>
parents: 5029
diff changeset
17 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
23cc3f54e536 Update FSF's office address.
Erik Naggum <erik@naggum.no>
parents: 5029
diff changeset
18 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23cc3f54e536 Update FSF's office address.
Erik Naggum <erik@naggum.no>
parents: 5029
diff changeset
19 ;; GNU General Public License for more details.
23cc3f54e536 Update FSF's office address.
Erik Naggum <erik@naggum.no>
parents: 5029
diff changeset
20
23cc3f54e536 Update FSF's office address.
Erik Naggum <erik@naggum.no>
parents: 5029
diff changeset
21 ;; You should have received a copy of the GNU General Public License
23cc3f54e536 Update FSF's office address.
Erik Naggum <erik@naggum.no>
parents: 5029
diff changeset
22 ;; along with GNU Emacs; see the file COPYING. If not, write to the
64084
a8fa7c632ee4 Update FSF's address.
Lute Kamstra <lute@gnu.org>
parents: 62249
diff changeset
23 ;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
a8fa7c632ee4 Update FSF's address.
Lute Kamstra <lute@gnu.org>
parents: 62249
diff changeset
24 ;; Boston, MA 02110-1301, USA.
466
a5749ca987d0 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
25
2140
c049f2ca31f6 Added headers, removed function-key bindings.
Eric S. Raymond <esr@snark.thyrsus.com>
parents: 498
diff changeset
26 ;;; Commentary:
466
a5749ca987d0 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
27
a5749ca987d0 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
28 ;; The function key sequences for the console have been converted for
a5749ca987d0 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
29 ;; use with function-key-map, but the *tool stuff hasn't been touched.
a5749ca987d0 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
30
2140
c049f2ca31f6 Added headers, removed function-key bindings.
Eric S. Raymond <esr@snark.thyrsus.com>
parents: 498
diff changeset
31 ;;; Code:
466
a5749ca987d0 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
32
a5749ca987d0 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
33 (defun scroll-down-in-place (n)
a5749ca987d0 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
34 (interactive "p")
a5749ca987d0 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
35 (previous-line n)
a5749ca987d0 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
36 (scroll-down n))
a5749ca987d0 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
37
a5749ca987d0 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
38 (defun scroll-up-in-place (n)
a5749ca987d0 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
39 (interactive "p")
a5749ca987d0 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
40 (next-line n)
a5749ca987d0 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
41 (scroll-up n))
a5749ca987d0 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
42
a5749ca987d0 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
43 (defun kill-region-and-unmark (beg end)
a5749ca987d0 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
44 "Like kill-region, but pops the mark [which equals point, anyway.]"
a5749ca987d0 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
45 (interactive "r")
a5749ca987d0 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
46 (kill-region beg end)
a5749ca987d0 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
47 (setq this-command 'kill-region-and-unmark)
a5749ca987d0 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
48 (set-mark-command t))
a5749ca987d0 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
49
a5749ca987d0 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
50 (defun select-previous-complex-command ()
a5749ca987d0 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
51 "Select Previous-complex-command"
a5749ca987d0 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
52 (interactive)
a5749ca987d0 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
53 (if (zerop (minibuffer-depth))
a5749ca987d0 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
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
a5749ca987d0 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
56 (previous-complex-command 1)))
a5749ca987d0 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
57
a5749ca987d0 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
58 (defun rerun-prev-command ()
a5749ca987d0 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
59 "Repeat Previous-complex-command."
a5749ca987d0 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
60 (interactive)
a5749ca987d0 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
61 (eval (nth 0 command-history)))
a5749ca987d0 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
62
a5749ca987d0 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
63 (defvar grep-arg nil "Default arg for RE-search")
a5749ca987d0 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
64 (defun grep-arg ()
a5749ca987d0 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
65 (if (memq last-command '(research-forward research-backward)) grep-arg
a5749ca987d0 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
66 (let* ((command (car command-history))
a5749ca987d0 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
67 (command-name (symbol-name (car command)))
a5749ca987d0 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
68 (search-arg (car (cdr command)))
49599
5ade352e8d1c Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents: 38475
diff changeset
69 (search-command
466
a5749ca987d0 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
70 (and command-name (string-match "search" command-name)))
a5749ca987d0 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
71 )
a5749ca987d0 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
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
a5749ca987d0 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
74 grep-arg (read-string "REsearch: " grep-arg)
a5749ca987d0 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
75 this-command search-command)
a5749ca987d0 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
76 grep-arg))))
a5749ca987d0 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
77
a5749ca987d0 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
78 (defun research-forward ()
a5749ca987d0 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
79 "Repeat RE search forward."
a5749ca987d0 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
80 (interactive)
a5749ca987d0 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
81 (re-search-forward (grep-arg)))
a5749ca987d0 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
82
a5749ca987d0 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
83 (defun research-backward ()
a5749ca987d0 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
84 "Repeat RE search backward."
a5749ca987d0 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
85 (interactive)
a5749ca987d0 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
86 (re-search-backward (grep-arg)))
a5749ca987d0 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
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
a5749ca987d0 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
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
a5749ca987d0 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
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
a5749ca987d0 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
100
498
b8f4bc96f789 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 466
diff changeset
101 (defvar sun-raw-prefix-hooks nil
b8f4bc96f789 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 466
diff changeset
102 "List of forms to evaluate after setting sun-raw-prefix.")
466
a5749ca987d0 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
103
a5749ca987d0 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
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
a5749ca987d0 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
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
a5749ca987d0 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
129
a5749ca987d0 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
130 (defvar suntool-map (make-sparse-keymap)
a5749ca987d0 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
131 "*Keymap for Emacstool bindings.")
a5749ca987d0 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
132
a5749ca987d0 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
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
a5749ca987d0 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
136
a5749ca987d0 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
137 (defvar suntool-map-hooks nil
a5749ca987d0 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
138 "List of forms to evaluate after setting suntool-map.")
a5749ca987d0 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
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
a5749ca987d0 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
147
49599
5ade352e8d1c Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents: 38475
diff changeset
148 (autoload 'sun-mouse-handler "sun-mouse"
466
a5749ca987d0 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
149 "Sun Emacstool handler for mouse blips (not loaded)." t)
a5749ca987d0 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
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
a5749ca987d0 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
260 (defun emacstool-init ()
a5749ca987d0 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
261 "Set up Emacstool window, if you know you are in an emacstool."
a5749ca987d0 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
262 ;; Make sure sun-mouse and sun-fns are loaded.
a5749ca987d0 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
263 (require 'sun-fns)
a5749ca987d0 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
264 (define-key ctl-x-map "\C-@" 'sun-mouse-handler)
a5749ca987d0 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
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
a5749ca987d0 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
267 (if (< (sun-window-init) 0)
a5749ca987d0 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
268 (message "Not a Sun Window")
a5749ca987d0 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
269 (progn
a5749ca987d0 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
270 (substitute-key-definition 'suspend-emacs 'suspend-emacstool global-map)
a5749ca987d0 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
271 (substitute-key-definition 'suspend-emacs 'suspend-emacstool esc-map)
a5749ca987d0 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
272 (substitute-key-definition 'suspend-emacs 'suspend-emacstool ctl-x-map))
a5749ca987d0 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
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
a5749ca987d0 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
275
a5749ca987d0 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
276 (defun sun-mouse-once ()
a5749ca987d0 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
277 "Converts to emacstool and sun-mouse-handler on first mouse hit."
a5749ca987d0 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
278 (interactive)
a5749ca987d0 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
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
695cf19ef79e Add arch taglines
Miles Bader <miles@gnu.org>
parents: 49599
diff changeset
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