[comp.sys.sgi] fix for emacs on 4D

gumby@Cygnus.COM (David V. Wallace) (06/11/91)

The following should make it easy to install emacs on a 4D.  They
should work under 3.3 and (no problems so far) 4.0.

These patches apply to a virgin 18.57.  Install config.h-sgi as
config.h (I use a symlink).  You may want to install the terminal
(.el) files in lisp/term (thanks to their author, Martin Liversage).
The patch to s-irix is desirable.

I put an "X" in column zero of every line below.
X#! /bin/sh
X# This is a shell archive, meaning:
X# 1. Remove everything above the #! /bin/sh line.
X# 2. Save the resulting text in a file.
X# 3. Execute the file with /bin/sh (not csh) to create:
X#	config.h-sgi
X#	iris-ansi-net.el
X#	iris-ansi.el
X#	s-diff
X# This archive created: Tue Jun 11 08:39:48 1991
Xexport PATH; PATH=/bin:/usr/bin:$PATH
Xif test -f 'config.h-sgi'
Xthen
X	echo shar: "will not over-write existing file 'config.h-sgi'"
Xelse
Xcat << \SHAR_EOF > 'config.h-sgi'
X/* GNU Emacs site configuration template file.
X   Copyright (C) 1988 Free Software Foundation, Inc.
X
XThis file is part of GNU Emacs.
X
XGNU Emacs is free software; you can redistribute it and/or modify
Xit under the terms of the GNU General Public License as published by
Xthe Free Software Foundation; either version 1, or (at your option)
Xany later version.
X
XGNU Emacs is distributed in the hope that it will be useful,
Xbut WITHOUT ANY WARRANTY; without even the implied warranty of
XMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
XGNU General Public License for more details.
X
XYou should have received a copy of the GNU General Public License
Xalong with GNU Emacs; see the file COPYING.  If not, write to
Xthe Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
X
X
X
X/* Include here a s- file that describes the system type you are using.
X   See the file ../etc/MACHINES for a list of systems and
X   the names of the s- files to use for them.
X   See s-template.h for documentation on writing s- files.  */
X#include "s-irix3-3.h"
X
X/* Include here a m- file that describes the machine and system you use.
X   See the file ../etc/MACHINES for a list of machines and
X   the names of the m- files to use for them.
X   See m-template.h for info on what m- files should define.
X   */
X#include "m-iris4d.h"
X
X/* Load in the conversion definitions if this system
X   needs them and the source file being compiled has not
X   said to inhibit this.  There should be no need for you
X   to alter these lines.  */
X
X#ifdef SHORTNAMES
X#ifndef NO_SHORTNAMES
X#include "../shortnames/remap.h"
X#endif /* not NO_SHORTNAMES */
X#endif /* SHORTNAMES */
X
X/* Define HAVE_X_WINDOWS if you want to use the X window system.  */
X
X#define HAVE_X_WINDOWS
X
X/* Define X11 if you want to use version 11 of X windows.
X   Otherwise, Emacs expects to use version 10.  */
X
X#define X11
X
X/* Define HAVE_X_MENU if you want to use the X window menu system.
X   This appears to work on some machines that support X
X   and not on others.  */
X
X/* #define HAVE_X_MENU */
X
X/* Define `subprocesses' should be defined if you want to
X   have code for asynchronous subprocesses
X   (as used in M-x compile and M-x shell).
X   These do not work for some USG systems yet;
X   for the ones where they work, the s-*.h file defines this flag.  */
X
X#ifndef VMS
X#ifndef USG
X#define subprocesses
X#endif
X#endif
X
X/* Define USER_FULL_NAME to return a string
X   that is the user's full name.
X   It can assume that the variable `pw'
X   points to the password file entry for this user.
X
X   At some sites, the pw_gecos field contains
X   the user's full name.  If neither this nor any other
X   field contains the right thing, use pw_name,
X   giving the user's login name, since that is better than nothing.  */
X
X#define USER_FULL_NAME pw->pw_gecos
X
X/* Define AMPERSAND_FULL_NAME if you use the convention
X   that & in the full name stands for the login id.  */
X
X/* #define AMPERSAND_FULL_NAME */
X
X/* # bytes of pure Lisp code to leave space for.
X   Note that s-vms.h and m-sun2.h may override this default.  */
X
X/* We need a large number for the lisp code, for some reason. */
X#define PURESIZE 250000
X
X#ifndef PURESIZE
X#ifdef HAVE_X_WINDOWS
X#define PURESIZE 122000
X#else
X#define PURESIZE 119000
X#endif
X#endif
X
X/* Define HIGHPRI as a negative number
X   if you want Emacs to run at a higher than normal priority.
X   For this to take effect, you must install Emacs with setuid root.
X   Emacs will change back to the users's own uid after setting
X   its priority.  */
X
X/* #define HIGHPRI */
X
XSHAR_EOF
Xfi
Xif test -f 'iris-ansi-net.el'
Xthen
X	echo shar: "will not over-write existing file 'iris-ansi-net.el'"
Xelse
Xcat << \SHAR_EOF > 'iris-ansi-net.el'
X(load (concat term-file-prefix "iris-ansi") nil t)
XSHAR_EOF
Xfi
Xif test -f 'iris-ansi.el'
Xthen
X	echo shar: "will not over-write existing file 'iris-ansi.el'"
Xelse
Xcat << \SHAR_EOF > 'iris-ansi.el'
X;;; A package to make the SGI keyboard more emacs-friendly
X;;; Courtesy Martin Liversage - 91.01.10 12:10:32
X;;; Royal Dental College Copenhagen
X;;; Department of Pediatric Dentistry
X;;; Norre Alle 20
X;;; DK-2200 Kobenhavn N
X;;; +45 31 37 17 00 - 4276
X
X(require 'keypad)
X
X(defvar iris-function-map nil)
X
X(if (not iris-function-map)
X    (progn
X      (setq iris-function-map (lookup-key global-map "\e["))
X      (if (not (keymapp iris-function-map))
X	  (setq iris-function-map (make-sparse-keymap)))
X      (setup-terminal-keymap iris-function-map
X			     '(("A" . ?u) ; Up
X			       ("B" . ?d) ; Down
X			       ("C" . ?r) ; Right
X			       ("D" . ?l) ; Left
X			       ("H" . ?h) ; Home
X			       ("150q" . ?P) ; Page Up
X			       ("154q" . ?N) ; Page Down
X			       ("001q" . ?\C-a) ; F1
X			       ("002q" . ?\C-b)
X			       ("003q" . ?\C-c)
X			       ("004q" . ?\C-d)
X			       ("005q" . ?\C-e)
X			       ("006q" . ?\C-f)
X			       ("007q" . ?\C-g)
X			       ("008q" . ?\C-h)
X			       ("009q" . ?\C-i)
X			       ("010q" . ?\C-j)
X			       ("011q" . ?\C-k)
X			       ("012q" . ?\C-l)
X			       ("013q" . ?\C-m) ; Shift-F1
X			       ("014q" . ?\C-n)
X			       ("015q" . ?\C-o)
X			       ("016q" . ?\C-p)
X			       ("017q" . ?\C-q)
X			       ("018q" . ?\C-r)
X			       ("019q" . ?\C-s)
X			       ("020q" . ?\C-t)
X			       ("021q" . ?\C-u)
X			       ("022q" . ?\C-v)
X			       ("023q" . ?\C-w)
X			       ("024q" . ?\C-x)
X			       ("139q" . ?I) ; Insert
X			       ("150q" . ?P) ; Page Up
X			       ("154q" . ?N))))) ; Page Down
X
X(defun enable-function-keys ()
X  "Enable the use of the iris arrow and function keys.
XBecause of the nature of the iris, this unavoidably breaks
Xthe standard Emacs command ESC [; therefore, it is not done by default,
Xbut only if you give this command."
X  (global-set-key "\e[" iris-function-map))
XSHAR_EOF
Xfi
Xif test -f 's-diff'
Xthen
X	echo shar: "will not over-write existing file 's-diff'"
Xelse
Xcat << \SHAR_EOF > 's-diff'
Xdiff -rwc dist-emacs-18.57/src/s-irix3-3.h merged-18.57/src/s-irix3-3.h
X*** dist-emacs-18.57/src/s-irix3-3.h	Sat Jan 12 11:44:06 1991
X--- merged-18.57/src/s-irix3-3.h	Fri Apr 12 08:08:31 1991
X***************
X*** 36,50 ****
X   does not have "job control" (the ability to stop a program,
X   run some other program, then continue the first one).  */
X  
X! #define NOMULTIPLEJOBS
X  
X  /* Default is to set interrupt_input to 0: don't do input buffering within Emacs */
X  
X  /* #define INTERRUPT_INPUT */
X  
X! /* Letter to use in finding device name of first pty,
X!   if system supports pty's.  'a' means it is /dev/ptya0  */
X! 
X  #define FIRST_PTY_LETTER 'a'
X  
X  /*
X--- 36,48 ----
X   does not have "job control" (the ability to stop a program,
X   run some other program, then continue the first one).  */
X  
X! /* #define NOMULTIPLEJOBS */
X  
X  /* Default is to set interrupt_input to 0: don't do input buffering within Emacs */
X  
X  /* #define INTERRUPT_INPUT */
X  
X! /* Irix does ptys differently so this is meaningless */
X  #define FIRST_PTY_LETTER 'a'
X  
X  /*
XSHAR_EOF
Xfi
Xexit 0
X#	End of shell archive