Annotation of 43BSDReno/contrib/emacs-18.55/etc/SUN-SUPPORT, revision 1.1.1.1

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

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.