annotate etc/SUN-SUPPORT @ 28446:28009885f082

Don't require cl, fortran. (add-log-current-defun-function): Doc fix. (change-log-version-number-regexp-list): Remove SCCS stuff. Doc fix. (change-log-mode-map): Defvar directly. (change-log-version-rcs): Function deleted. (change-log-version-number-search): Doc fix.
author Dave Love <fx@gnu.org>
date Fri, 31 Mar 2000 16:00:08 +0000
parents e96ffe544684
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
25853
Dave Love <fx@gnu.org>
parents:
diff changeset
1 NOTE: the Free Software Foundation agreed to put this file, and the
Dave Love <fx@gnu.org>
parents:
diff changeset
2 programs it describes, into the Emacs distribution ONLY on the
Dave Love <fx@gnu.org>
parents:
diff changeset
3 condition that we would not lift a finger to maintain them! We are
Dave Love <fx@gnu.org>
parents:
diff changeset
4 willing to *pass along* support for Sun windows, but we are not
Dave Love <fx@gnu.org>
parents:
diff changeset
5 willing to let it distract us from what we are trying to do. If you
Dave Love <fx@gnu.org>
parents:
diff changeset
6 have complaints or suggestions about Sun windows support, send them to
Dave Love <fx@gnu.org>
parents:
diff changeset
7 peck@sun.com, who is the maintainer.
Dave Love <fx@gnu.org>
parents:
diff changeset
8
Dave Love <fx@gnu.org>
parents:
diff changeset
9
Dave Love <fx@gnu.org>
parents:
diff changeset
10 The interface between GNU Emacs and Sun windows consists of the program
Dave Love <fx@gnu.org>
parents:
diff changeset
11 etc/emacstool, the Lisp programs lisp/sun-*.el and lisp/term/sun.el,
Dave Love <fx@gnu.org>
parents:
diff changeset
12 and the C source file src/sunfns.c. It is documented with a man page,
Dave Love <fx@gnu.org>
parents:
diff changeset
13 etc/emacstool.1.
Dave Love <fx@gnu.org>
parents:
diff changeset
14
Dave Love <fx@gnu.org>
parents:
diff changeset
15 To enable use of these files and programs, define the configuration
Dave Love <fx@gnu.org>
parents:
diff changeset
16 switch HAVE_SUN_WINDOWS in src/config.h before compiling Emacs.
Dave Love <fx@gnu.org>
parents:
diff changeset
17 The definition of HAVE_SUN_WINDOWS must precede the #include m-sun3.h
Dave Love <fx@gnu.org>
parents:
diff changeset
18 or #include m-sun4.h.
Dave Love <fx@gnu.org>
parents:
diff changeset
19 If you must change PURESIZE, do so after the #include m-sun3.h
Dave Love <fx@gnu.org>
parents:
diff changeset
20
Dave Love <fx@gnu.org>
parents:
diff changeset
21 This software is based on SunView for Sun UNIX 4.2 Release 3.2,
Dave Love <fx@gnu.org>
parents:
diff changeset
22 and will not work "as is" on previous releases, eg 3.0 or 3.1.
Dave Love <fx@gnu.org>
parents:
diff changeset
23
Dave Love <fx@gnu.org>
parents:
diff changeset
24 Using Emacstool with GNU Emacs:
Dave Love <fx@gnu.org>
parents:
diff changeset
25
Dave Love <fx@gnu.org>
parents:
diff changeset
26 The GNU Emacs files lisp/term/sun.el, lisp/sun-mouse.el,
Dave Love <fx@gnu.org>
parents:
diff changeset
27 lisp/sun-fns.el, and src/sunfns.c provide emacs support for the
Dave Love <fx@gnu.org>
parents:
diff changeset
28 Emacstool and function keys. If your terminal type is SUN (that is,
Dave Love <fx@gnu.org>
parents:
diff changeset
29 if your environment variable TERM is set to SUN), then Emacs will
Dave Love <fx@gnu.org>
parents:
diff changeset
30 automatically load the file lisp/term/sun.el. This, in turn, will
Dave Love <fx@gnu.org>
parents:
diff changeset
31 ensure that sun-mouse.el is autoloaded when any mouse events are
Dave Love <fx@gnu.org>
parents:
diff changeset
32 detected. It is suggested that sun-mouse and sun-fns be
Dave Love <fx@gnu.org>
parents:
diff changeset
33 included in your site-init.el file, so that they will always be loaded
Dave Love <fx@gnu.org>
parents:
diff changeset
34 when running on a Sun workstation. [Increase PURESIZE to 154000].
Dave Love <fx@gnu.org>
parents:
diff changeset
35
Dave Love <fx@gnu.org>
parents:
diff changeset
36 Support for the Sun function keys requires disconnecting the standard
Dave Love <fx@gnu.org>
parents:
diff changeset
37 Emacs command Meta-[. Therefore, the function keys are supported only
Dave Love <fx@gnu.org>
parents:
diff changeset
38 if you do (setq sun-esc-bracket t) in your .emacs file.
Dave Love <fx@gnu.org>
parents:
diff changeset
39
Dave Love <fx@gnu.org>
parents:
diff changeset
40 The file src/sunfns.c defines several useful functions for emacs on
Dave Love <fx@gnu.org>
parents:
diff changeset
41 the Sun. Among these are procedures to pop-up SunView menus, put and
Dave Love <fx@gnu.org>
parents:
diff changeset
42 get from the SunView selection [STUFF] buffer, and a procedure for
Dave Love <fx@gnu.org>
parents:
diff changeset
43 changing the cursor icon. If you want to define cursor icons, try
Dave Love <fx@gnu.org>
parents:
diff changeset
44 using the functions in lisp/sun-cursors.el.
Dave Love <fx@gnu.org>
parents:
diff changeset
45
Dave Love <fx@gnu.org>
parents:
diff changeset
46 The file lisp/sun-mouse.el includes a mass of software for defining
Dave Love <fx@gnu.org>
parents:
diff changeset
47 bindings for mouse events. Any function can be called or any form
Dave Love <fx@gnu.org>
parents:
diff changeset
48 evaluated as a result of a mouse event. If you want a pop-up menu,
Dave Love <fx@gnu.org>
parents:
diff changeset
49 your function can call sun-menu-evaluate. This will bring up a
Dave Love <fx@gnu.org>
parents:
diff changeset
50 SunView walking menu of your choice.
Dave Love <fx@gnu.org>
parents:
diff changeset
51
Dave Love <fx@gnu.org>
parents:
diff changeset
52 Use the macro (defmenu menu-name &rest menu-items) to define menu
Dave Love <fx@gnu.org>
parents:
diff changeset
53 objects. Each menu item is a cons of ("string" . VALUE), VALUE is
Dave Love <fx@gnu.org>
parents:
diff changeset
54 evaluated when the string item is picked. If VALUE is a menu, then a
Dave Love <fx@gnu.org>
parents:
diff changeset
55 pullright item is created.
Dave Love <fx@gnu.org>
parents:
diff changeset
56
Dave Love <fx@gnu.org>
parents:
diff changeset
57 This version also includes support for copying to and from the
Dave Love <fx@gnu.org>
parents:
diff changeset
58 sun-windows "stuff" selection. The keyboard bindings defined in
Dave Love <fx@gnu.org>
parents:
diff changeset
59 lisp/sun-fns.el let you move the current region to the "STUFF"
Dave Love <fx@gnu.org>
parents:
diff changeset
60 selection and vice versa. Just set point with the left button, set
Dave Love <fx@gnu.org>
parents:
diff changeset
61 mark with the middle button, (the region is automatically copied to
Dave Love <fx@gnu.org>
parents:
diff changeset
62 "STUFF") then switch to a shelltool, and "Stuff" will work. Going the
Dave Love <fx@gnu.org>
parents:
diff changeset
63 other way, the main right button menu contains a "Stuff Selection"
Dave Love <fx@gnu.org>
parents:
diff changeset
64 command that works just like in shelltool. [The Get and Put function
Dave Love <fx@gnu.org>
parents:
diff changeset
65 keys are also assigned to these functions, so you don't need the mouse
Dave Love <fx@gnu.org>
parents:
diff changeset
66 or even emacstool to make this work.]
Dave Love <fx@gnu.org>
parents:
diff changeset
67
Dave Love <fx@gnu.org>
parents:
diff changeset
68 Until someone write code to read the textsw "Selection Shelf", it is
Dave Love <fx@gnu.org>
parents:
diff changeset
69 not possible to copy directly from a textsw to emacs, you must go through
Dave Love <fx@gnu.org>
parents:
diff changeset
70 the textsw "STUFF" selection.
Dave Love <fx@gnu.org>
parents:
diff changeset
71
Dave Love <fx@gnu.org>
parents:
diff changeset
72 The Scroll-bar region is not a SunView scrollbar. It really should
Dave Love <fx@gnu.org>
parents:
diff changeset
73 be called the "Right-Margin" region. The scroll bar region is basically
Dave Love <fx@gnu.org>
parents:
diff changeset
74 the rightmost five columns (see documentation on variable scrollbar-width).
Dave Love <fx@gnu.org>
parents:
diff changeset
75 Mouse hits in this region can have special bindings, currently those binding
Dave Love <fx@gnu.org>
parents:
diff changeset
76 effect scrolling of the window, and so are referred to as the "Scroll-bar"
Dave Love <fx@gnu.org>
parents:
diff changeset
77 region.
Dave Love <fx@gnu.org>
parents:
diff changeset
78
Dave Love <fx@gnu.org>
parents:
diff changeset
79 For information on what mouse bindings are in effect, use the command
Dave Love <fx@gnu.org>
parents:
diff changeset
80 M-x Describe-mouse-bindings, or the quick pop-up menu item "Mouse-Help".
Dave Love <fx@gnu.org>
parents:
diff changeset
81
Dave Love <fx@gnu.org>
parents:
diff changeset
82
Dave Love <fx@gnu.org>
parents:
diff changeset
83 GNU Emacs EXAMPLES:
Dave Love <fx@gnu.org>
parents:
diff changeset
84 See definitions in lisp/sun-fns.el for examples.
Dave Love <fx@gnu.org>
parents:
diff changeset
85
Dave Love <fx@gnu.org>
parents:
diff changeset
86 You can redefine the cursor that is displayed in the emacs window.
Dave Love <fx@gnu.org>
parents:
diff changeset
87 On initialization, it is set to a right arrow. See lisp/sun-cursors.el
Dave Love <fx@gnu.org>
parents:
diff changeset
88 for additional cursors, how to define them, how to edit them.
Dave Love <fx@gnu.org>
parents:
diff changeset
89
Dave Love <fx@gnu.org>
parents:
diff changeset
90 BUGS:
Dave Love <fx@gnu.org>
parents:
diff changeset
91 It takes a few milliseconds to create a menu before it pops up.
Dave Love <fx@gnu.org>
parents:
diff changeset
92 Someone who understands the GNU Garbage Collector might see if it
Dave Love <fx@gnu.org>
parents:
diff changeset
93 is possible for defmenu to create a SunView menu struct that does
Dave Love <fx@gnu.org>
parents:
diff changeset
94 not get destroyed by Garbage Collection.
Dave Love <fx@gnu.org>
parents:
diff changeset
95
Dave Love <fx@gnu.org>
parents:
diff changeset
96 An outline of the files used to support Sun Windows and the mouse.
Dave Love <fx@gnu.org>
parents:
diff changeset
97
Dave Love <fx@gnu.org>
parents:
diff changeset
98 etc/SUN-SUPPORT.
Dave Love <fx@gnu.org>
parents:
diff changeset
99 This document.
Dave Love <fx@gnu.org>
parents:
diff changeset
100
Dave Love <fx@gnu.org>
parents:
diff changeset
101 etc/emacstool.1:
Dave Love <fx@gnu.org>
parents:
diff changeset
102 Added: an nroff'able man page for emacstool.
Dave Love <fx@gnu.org>
parents:
diff changeset
103
Dave Love <fx@gnu.org>
parents:
diff changeset
104 etc/emacstool.c:
Dave Love <fx@gnu.org>
parents:
diff changeset
105 Encodes all the function keys internally, and passes non-window
Dave Love <fx@gnu.org>
parents:
diff changeset
106 system arguments to emacs.
Dave Love <fx@gnu.org>
parents:
diff changeset
107
Dave Love <fx@gnu.org>
parents:
diff changeset
108 etc/emacs.icon:
Dave Love <fx@gnu.org>
parents:
diff changeset
109 The "Kitchen Sink" GNU Emacs icon.
Dave Love <fx@gnu.org>
parents:
diff changeset
110
Dave Love <fx@gnu.org>
parents:
diff changeset
111 src/sunfns.c:
Dave Love <fx@gnu.org>
parents:
diff changeset
112 This contains the auxiliary functions that allow elisp code to interact
Dave Love <fx@gnu.org>
parents:
diff changeset
113 with the sunwindows, selection, and menu functions.
Dave Love <fx@gnu.org>
parents:
diff changeset
114
Dave Love <fx@gnu.org>
parents:
diff changeset
115 lisp/sun-mouse.el:
Dave Love <fx@gnu.org>
parents:
diff changeset
116 Defines the lisp function which is called when a mouse hit is found
Dave Love <fx@gnu.org>
parents:
diff changeset
117 in the input queue. This handler decodes the mouse hit via a keymap-like
Dave Love <fx@gnu.org>
parents:
diff changeset
118 structure sensitive to a particular window and where in the window the
Dave Love <fx@gnu.org>
parents:
diff changeset
119 hit occurred (text-region, right-margin, mode-line). Three variables
Dave Love <fx@gnu.org>
parents:
diff changeset
120 are bound (*mouse-window* *mouse-x* *mouse-y*) and the selected function
Dave Love <fx@gnu.org>
parents:
diff changeset
121 is called.
Dave Love <fx@gnu.org>
parents:
diff changeset
122 See documentation on "define-mouse" or look at lisp/sun-fns.el
Dave Love <fx@gnu.org>
parents:
diff changeset
123 to see how this is done.
Dave Love <fx@gnu.org>
parents:
diff changeset
124 Defines two functions to pass between region and sun-selection
Dave Love <fx@gnu.org>
parents:
diff changeset
125 Defines functions for interfacing with the Menu.
Dave Love <fx@gnu.org>
parents:
diff changeset
126 During menu evaluation, the variables *menu-window* *menu-x* *menu-y* are bound.
Dave Love <fx@gnu.org>
parents:
diff changeset
127
Dave Love <fx@gnu.org>
parents:
diff changeset
128 lisp/sun-fns.el
Dave Love <fx@gnu.org>
parents:
diff changeset
129 The definition of the default menu and mouse function bindings.
Dave Love <fx@gnu.org>
parents:
diff changeset
130
Dave Love <fx@gnu.org>
parents:
diff changeset
131 lisp/sun-cursors.el
Dave Love <fx@gnu.org>
parents:
diff changeset
132 Defines a number of alternate cursors, and an editor for them.
Dave Love <fx@gnu.org>
parents:
diff changeset
133 The editor is also a demonstration of mouse/menu utilization.
Dave Love <fx@gnu.org>
parents:
diff changeset
134
Dave Love <fx@gnu.org>
parents:
diff changeset
135 lisp/term/sun.el
Dave Love <fx@gnu.org>
parents:
diff changeset
136 Sets up the keymap to make the sun function keys do useful things.
Dave Love <fx@gnu.org>
parents:
diff changeset
137 Also includes the setup/initialization code for running under emacstool,
Dave Love <fx@gnu.org>
parents:
diff changeset
138 which makes "\C-Z" just close the emacstool window (-WI emacs.icon).
Dave Love <fx@gnu.org>
parents:
diff changeset
139
Dave Love <fx@gnu.org>
parents:
diff changeset
140 Jeff Peck, Sun Microsystems, Inc <peck@sun.com>
Dave Love <fx@gnu.org>
parents:
diff changeset
141
Dave Love <fx@gnu.org>
parents:
diff changeset
142
Dave Love <fx@gnu.org>
parents:
diff changeset
143 Subject: Making multi-line scrolling really work:
Dave Love <fx@gnu.org>
parents:
diff changeset
144
Dave Love <fx@gnu.org>
parents:
diff changeset
145 In your .defaults file, include the line:
Dave Love <fx@gnu.org>
parents:
diff changeset
146 /Tty/Retained "Yes"
Dave Love <fx@gnu.org>
parents:
diff changeset
147 That way, the terminal emulator can do text moves using bitblt,
Dave Love <fx@gnu.org>
parents:
diff changeset
148 instead of repaint.
Dave Love <fx@gnu.org>
parents:
diff changeset
149
Dave Love <fx@gnu.org>
parents:
diff changeset
150 If that's not enough for you, then tell unix and emacs that
Dave Love <fx@gnu.org>
parents:
diff changeset
151 the sun terminal supports multi-line and multi-character insert/delete.
Dave Love <fx@gnu.org>
parents:
diff changeset
152 Add this patch to your /etc/termcap file:
Dave Love <fx@gnu.org>
parents:
diff changeset
153
Dave Love <fx@gnu.org>
parents:
diff changeset
154 *** /etc/termcap.~1~ Mon Sep 15 12:34:23 1986
Dave Love <fx@gnu.org>
parents:
diff changeset
155 --- /etc/termcap Mon Feb 9 17:34:08 1987
Dave Love <fx@gnu.org>
parents:
diff changeset
156 ***************
Dave Love <fx@gnu.org>
parents:
diff changeset
157 *** 32,39 ****
Dave Love <fx@gnu.org>
parents:
diff changeset
158 --- 32,40 ----
Dave Love <fx@gnu.org>
parents:
diff changeset
159 Mu|sun|Sun Microsystems Workstation console:\
Dave Love <fx@gnu.org>
parents:
diff changeset
160 :am:bs:km:mi:ms:pt:li#34:co#80:cl=^L:cm=\E[%i%d;%dH:\
Dave Love <fx@gnu.org>
parents:
diff changeset
161 :ce=\E[K:cd=\E[J:so=\E[7m:se=\E[m:rs=\E[s:\
Dave Love <fx@gnu.org>
parents:
diff changeset
162 :al=\E[L:dl=\E[M:im=:ei=:ic=\E[@:dc=\E[P:\
Dave Love <fx@gnu.org>
parents:
diff changeset
163 + :AL=\E[%dL:DL=\E[%dM:IC=\E[%d@:DC=\E[%dP:\
Dave Love <fx@gnu.org>
parents:
diff changeset
164 :up=\E[A:nd=\E[C:ku=\E[A:kd=\E[B:kr=\E[C:kl=\E[D:\
Dave Love <fx@gnu.org>
parents:
diff changeset
165 :k1=\E[224z:k2=\E[225z:k3=\E[226z:k4=\E[227z:k5=\E[228z:\
Dave Love <fx@gnu.org>
parents:
diff changeset
166 :k6=\E[229z:k7=\E[230z:k8=\E[231z:k9=\E[232z:
Dave Love <fx@gnu.org>
parents:
diff changeset
167 M-|sun-nic|sune|Sun Microsystems Workstation console without insert character:\
Dave Love <fx@gnu.org>
parents:
diff changeset
168
Dave Love <fx@gnu.org>
parents:
diff changeset
169
Dave Love <fx@gnu.org>
parents:
diff changeset
170 If you don't have the program "patch", just add the line:
Dave Love <fx@gnu.org>
parents:
diff changeset
171 :AL=\E[%dL:DL=\E[%dM:IC=\E[%d@:DC=\E[%dP:\
Dave Love <fx@gnu.org>
parents:
diff changeset
172
Dave Love <fx@gnu.org>
parents:
diff changeset
173 casetek@crvax.sri.com says:
Dave Love <fx@gnu.org>
parents:
diff changeset
174
Dave Love <fx@gnu.org>
parents:
diff changeset
175 Those of you using GNU Emacs on Sun workstations under
Dave Love <fx@gnu.org>
parents:
diff changeset
176 3.2 may be interested in reducing memory utilization in
Dave Love <fx@gnu.org>
parents:
diff changeset
177 the emacstool via the Sun toolmerge facility. The technique
Dave Love <fx@gnu.org>
parents:
diff changeset
178 is described in the Release 3.2 Manual starting on page
Dave Love <fx@gnu.org>
parents:
diff changeset
179 71. The following is a summary of how it would apply
Dave Love <fx@gnu.org>
parents:
diff changeset
180 to merging emacstool into the basetools.
Dave Love <fx@gnu.org>
parents:
diff changeset
181
Dave Love <fx@gnu.org>
parents:
diff changeset
182 1) Change the main procedure declaration in emacstool.c to:
Dave Love <fx@gnu.org>
parents:
diff changeset
183
Dave Love <fx@gnu.org>
parents:
diff changeset
184 #ifdef SUN_TOOLMERGE
Dave Love <fx@gnu.org>
parents:
diff changeset
185 emacstool_main (argc, argv);
Dave Love <fx@gnu.org>
parents:
diff changeset
186 #else
Dave Love <fx@gnu.org>
parents:
diff changeset
187 main (argc, argv)
Dave Love <fx@gnu.org>
parents:
diff changeset
188 #endif
Dave Love <fx@gnu.org>
parents:
diff changeset
189
Dave Love <fx@gnu.org>
parents:
diff changeset
190 This will allow creation of either standard or toolmerge
Dave Love <fx@gnu.org>
parents:
diff changeset
191 versions.
Dave Love <fx@gnu.org>
parents:
diff changeset
192
Dave Love <fx@gnu.org>
parents:
diff changeset
193 2) Copy emacstool.o into directory /usr/src/sun/suntool.
Dave Love <fx@gnu.org>
parents:
diff changeset
194 3) make CFLAGS="-g -DSUN_TOOLMERGE" emacstool.o
Dave Love <fx@gnu.org>
parents:
diff changeset
195 4) Add the following line to basetools.h
Dave Love <fx@gnu.org>
parents:
diff changeset
196
Dave Love <fx@gnu.org>
parents:
diff changeset
197 "emacstool",emacstool_main,
Dave Love <fx@gnu.org>
parents:
diff changeset
198
Dave Love <fx@gnu.org>
parents:
diff changeset
199 5) Add the following line to toolmerge.c.
Dave Love <fx@gnu.org>
parents:
diff changeset
200
Dave Love <fx@gnu.org>
parents:
diff changeset
201 extern emacstool_main();
Dave Love <fx@gnu.org>
parents:
diff changeset
202
Dave Love <fx@gnu.org>
parents:
diff changeset
203 6) make basetools MOREOBJS="emacstool.o"
Dave Love <fx@gnu.org>
parents:
diff changeset
204 7) make install_bins
Dave Love <fx@gnu.org>
parents:
diff changeset
205
Dave Love <fx@gnu.org>
parents:
diff changeset
206 To invoke the toolmerged version, you must exit suntools and
Dave Love <fx@gnu.org>
parents:
diff changeset
207 re-start it. Make sure that /usr/bin occurs before the directory
Dave Love <fx@gnu.org>
parents:
diff changeset
208 in which you installed the standard (non-toolmerged) version.
Dave Love <fx@gnu.org>
parents:
diff changeset
209
Dave Love <fx@gnu.org>
parents:
diff changeset
210