jove (4.16.0.72-2) direct (non packaging) changes

Summary

 Makefile       |   60 ++++++++++++++++++++++++++++++++++++++++----------------
 doc/intro.nr   |   17 +++++++--------
 doc/jem.rc     |   61 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 doc/jem1.hlp   |   16 ++++++++++++++
 doc/jem1.txt   |    3 ++
 doc/jove.nr    |    4 +--
 doc/jove.rc    |   22 +++++++++++++++-----
 doc/xjove.nr   |   19 ++---------------
 jove.c         |    2 -
 recover.c      |    3 +-
 xjove/Makefile |   50 ++++++++++++++++++++++++++++++++++++++--------
 11 files changed, 197 insertions(+), 60 deletions(-)

    
download this patch

Patch contents

--- jove-4.16.0.72.orig/recover.c
+++ jove-4.16.0.72/recover.c
@@ -776,7 +776,7 @@
 
 	last_update = ctime(&(rec->UpdTime));
 	/* Start up mail */
-	sprintf(mail_cmd, "/bin/mail %s", pw->pw_name);
+	sprintf(mail_cmd, "/usr/sbin/sendmail -t %s", pw->pw_name);
 	setuid(getuid());
 	if ((mail_pipe = popen(mail_cmd, "w")) == NULL)
 		return;
@@ -787,6 +787,7 @@
 		buf_string = "buffer";
 	else
 		buf_string = "buffers";
+	fprintf(mail_pipe, "To: %s\n", pw->pw_name);
 	fprintf(mail_pipe, "Subject: System crash\n");
 	fprintf(mail_pipe, " \n");
 	fprintf(mail_pipe, "Jove saved %d %s when the system \"%s\"\n",
--- jove-4.16.0.72.orig/Makefile
+++ jove-4.16.0.72/Makefile
@@ -21,13 +21,14 @@
 # If they don't exist, this makefile will try to create the directories
 # LIBDIR and SHAREDIR.  All others must already exist.
 
-JOVEHOME = /usr/local
+JOVEHOME = ${DESTDIR}/usr
 SHAREDIR = $(JOVEHOME)/lib/jove
 LIBDIR = $(JOVEHOME)/lib/jove
 BINDIR = $(JOVEHOME)/bin
 XEXT=
-MANDIR = $(JOVEHOME)/man/man$(MANEXT)
+MANDIR = $(JOVEHOME)/share/man/man$(MANEXT)
 MANEXT = 1
+CONFIGDIR=${DESTDIR}/etc/jove
 
 # TMPDIR is where the tmp files get stored, usually /tmp, /var/tmp, or
 # /usr/tmp.  If you wish to be able to recover buffers after a system
@@ -38,11 +39,11 @@
 # (in case the system startup salvages tempfiles by moving them,
 # which is probably a good idea).
 
-TMPDIR = /tmp
-RECDIR = /var/preserve
+TMPDIR = /var/tmp
+RECDIR = ${DESTDIR}/var/lib/jove/preserve
 
 # DFLTSHELL is the default shell invoked by JOVE and TEACHJOVE.
-DFLTSHELL = /bin/csh
+DFLTSHELL = /bin/sh
 
 # The install commands of BSD and System V differ in unpleasant ways:
 # -c: copy (BSD); -c dir: destination directory (SysV)
@@ -56,15 +57,21 @@
 INSTALLFLAGS = # -g bin -o root
 
 # to install executable files
-XINSTALL=cp
+XINSTALL=install -m 755
+#XINSTALL=cp
 #XINSTALL=/usr/ucb/install $(INSTALLFLAGS) -c -m 755 # -s
 #CYGWIN32: XINSTALL=install $(INSTALLFLAGS) -c -m 755
 
 # to install text files
-TINSTALL=cp
+TINSTALL=install -m 644
+#TINSTALL=cp
 #TINSTALL=/usr/ucb/install $(INSTALLFLAGS) -c -m 644
 #CYGWIN32: TINSTALL=install $(INSTALLFLAGS) -c -m 644
 
+# to install directories
+DINSTALL=install -d 755
+#DINSTALL=mkdir -p
+
 # These should all just be right if the above ones are.
 # You will confuse JOVE if you move anything from LIBDIR or SHAREDIR.
 
@@ -72,7 +79,7 @@
 TEACHJOVE = $(BINDIR)/teachjove$(XEXT)
 RECOVER = $(LIBDIR)/recover$(XEXT)
 PORTSRV = $(LIBDIR)/portsrv$(XEXT)
-JOVERC = $(SHAREDIR)/jove.rc
+JOVERC = $(CONFIGDIR)/jove.rc
 TERMSDIR = $(SHAREDIR)
 CMDS.DOC = $(SHAREDIR)/cmds.doc
 TEACH-JOVE = $(SHAREDIR)/teach-jove
@@ -146,7 +153,7 @@
 # On DEC OSF/1 and Digital UNIX VV4.0, add -std1 to enable ANSI C features
 # and perhaps -g3 for more debugging info with optimization.
 
-OPTFLAGS = -O
+OPTFLAGS = -O2 -Wall
 
 # For making dependencies under BSD systems
 DEPENDFLAG = -M
@@ -235,7 +242,8 @@
 TROFF = troff -Tpost
 TROFFPOST = | /usr/lib/lp/postscript/dpost -
 
-MANUALS = $(JOVEM) $(TEACHJOVEM) $(XJOVEM) $(JOVETOOLM)
+MANUALS = $(JOVEM) $(TEACHJOVEM)
+# $(XJOVEM) $(JOVETOOLM)
 
 C_SRC = commands.c commands.tab abbrev.c argcount.c ask.c buf.c c.c case.c jctype.c \
 	delete.c disp.c extend.c fp.c fmt.c insert.c io.c iproc.c \
@@ -268,6 +276,7 @@
 DOCS =	doc/README doc/teach-jove doc/jove.qref \
 	doc/intro.nr doc/cmds.macros.nr doc/cmds.nr doc/contents.nr \
 	doc/jove.nr doc/teachjove.nr doc/xjove.nr doc/jovetool.nr \
+	doc/jem.rc doc/jem1.txt doc/jem1.hlp \
 	doc/jove.rc doc/example.rc $(DOCTERMS)
 
 MISC =	Makefile Makefile.bcc Makefile.msc Makefile.wat Makefile.zor \
@@ -282,8 +291,7 @@
 # all: default target.
 # Builds everything that "install" needs.
 all:	jjove$(XEXT) recover$(XEXT) teachjove$(XEXT) portsrv$(XEXT) \
-	doc/cmds.doc doc/jove.$(MANEXT) doc/teachjove.$(MANEXT) \
-	doc/jovetool.$(MANEXT)
+	doc/cmds.doc doc/jove.$(MANEXT) doc/teachjove.$(MANEXT) 
 
 jjove$(XEXT):	$(OBJECTS)
 	$(LDCC) $(LDFLAGS) $(OPTFLAGS) -o jjove$(XEXT) $(OBJECTS) $(TERMCAPLIB) $(EXTRALIBS)
@@ -340,6 +348,7 @@
 	@echo \#define LIBDIR \"$(LIBDIR)\" >> paths.h
 	@echo \#define SHAREDIR \"$(SHAREDIR)\" >> paths.h
 	@echo \#define DFLTSHELL \"$(DFLTSHELL)\" >> paths.h
+	@echo \#define CONFIGDIR \"$(CONFIGDIR)\" >> paths.h
 
 makexjove:
 	( cd xjove ; make CC="$(CC)" OPTFLAGS="$(OPTFLAGS)" SYSDEFS="$(SYSDEFS)" $(TOOLMAKEEXTRAS) xjove )
@@ -347,6 +356,9 @@
 installxjove:
 	( cd xjove ; make CC="$(CC)" OPTFLAGS="$(OPTFLAGS)" SYSDEFS="$(SYSDEFS)" XINSTALL="$(XINSTALL)" BINDIR="$(BINDIR)" INSTALLFLAGS="$(INSTALLFLAGS)" $(TOOLMAKEEXTRAS) installxjove )
 
+cleanxjove:
+	( cd xjove ; make CC="$(CC)" OPTFLAGS="$(OPTFLAGS)" SYSDEFS="$(SYSDEFS)" XINSTALL="$(XINSTALL)" BINDIR="$(BINDIR)" INSTALLFLAGS="$(INSTALLFLAGS)" $(TOOLMAKEEXTRAS) clean )
+
 makejovetool:
 	( cd xjove ; make CC="$(CC)" OPTFLAGS="$(OPTFLAGS)" SYSDEFS="$(SYSDEFS)" DEFINES=-DSUNVIEW $(TOOLMAKEEXTRAS) jovetool )
 
@@ -357,18 +369,32 @@
 # Thus, if "all" is done first, "install" can be invoked with
 # JOVEHOME pointing at a playpen where files are to be marshalled.
 # This property is fragile.
-install: $(LIBDIR) $(SHAREDIR) \
+install: $(BINDIR) $(LIBDIR) $(SHAREDIR) $(CONFIGDIR) $(RECDIR)\
 	 $(TEACH-JOVE) $(CMDS.DOC) $(TERMSDIR)docs \
 	 $(PORTSRVINST) $(RECOVER) $(JOVE) $(TEACHJOVE) $(MANUALS)
-	$(TINSTALL) doc/jove.rc $(JOVERC)
+	$(TINSTALL) doc/jem.rc doc/jem1.txt doc/jem1.hlp $(SHAREDIR)
+	$(TINSTALL) doc/jove.rc $(CONFIGDIR)
 	@echo See the README about changes to /etc/rc or /etc/rc.local
 	@echo so that the system recovers jove files on reboot after a crash
 
+$(BINDIR)::
+	$(DINSTALL) $(BINDIR)
+
 $(LIBDIR)::
-	test -d $(LIBDIR) || mkdir -p $(LIBDIR)
+	$(DINSTALL) $(LIBDIR)
 
 $(SHAREDIR)::
-	test -d $(SHAREDIR) || mkdir -p $(SHAREDIR)
+	$(DINSTALL) $(SHAREDIR)
+
+$(CONFIGDIR)::
+	 $(DINSTALL) $(CONFIGDIR)
+
+$(RECDIR)::
+	$(DINSTALL) $(RECDIR)
+	chmod 1777 $(RECDIR)
+
+$(MANDIR)::
+	$(DINSTALL) $(MANDIR)
 
 $(TEACH-JOVE): doc/teach-jove
 	$(TINSTALL) doc/teach-jove $(TEACH-JOVE)
@@ -409,7 +435,7 @@
 	     -e 's;<SHAREDIR>;$(SHAREDIR);' \
 	     -e 's;<SHELL>;$(DFLTSHELL);' doc/jove.nr > doc/jove.$(MANEXT)
 
-$(JOVEM): doc/jove.$(MANEXT)
+$(JOVEM): $(MANDIR) doc/jove.$(MANEXT)
 	$(TINSTALL) doc/jove.$(MANEXT) $(JOVEM)
 
 # doc/jove.doc is the formatted manpage (only needed by DOS)
--- jove-4.16.0.72.orig/jove.c
+++ jove-4.16.0.72/jove.c
@@ -1576,7 +1576,7 @@
 	char	Joverc[FILESIZE];
 
 	if (dosys) {
-		PathCat(Joverc, sizeof(Joverc), ShareDir, "jove.rc");
+		PathCat(Joverc, sizeof(Joverc), CONFIGDIR, "jove.rc");
 		(void) joverc(Joverc);	/* system wide jove.rc */
 	}
 
--- jove-4.16.0.72.orig/xjove/Makefile
+++ jove-4.16.0.72/xjove/Makefile
@@ -25,23 +25,31 @@
 
 # For SunView:
 # DEFINES=-DSUNVIEW
-DEFINES=
+# DEFINES=
 
 # for Solaris 2.x:
-SYSDEFS=-DSYSVR4
+#SYSDEFS=-DSYSVR4
 # -i: ignore any LD_LIBRARY_PATH setting
 # -L<dir>: add <dir> to library search path
 # -R<dir[:dir]>: specify library search directories to dynamic linker
-XJLDFLAGS= -i -L$$OPENWINHOME/lib -R$$OPENWINHOME/lib
+#XJLDFLAGS= -i -L$$OPENWINHOME/lib -R$$OPENWINHOME/lib
 
 # for Sun0s4.x:
 # XJLDFLAGS=-L$$OPENWINHOME/lib
 # SYSDEFS=-DSUNOS41
+# XJCFLAGS = -I$$OPENWINHOME/include
+
+# for Debian Linux
+SYSDEFS=-DBSDPOSIX
+XJLDFLAGS=-L/usr/lib
+XJCFLAGS=-I/usr/include
 
 CFLAGS = $(OPTFLAGS) -I.. $(SYSDEFS) $(DEFINES)
-XJCFLAGS = -I$$OPENWINHOME/include
 
-BINDIR = /usr/local/bin
+XJOVEHOME = ${DESTDIR}/usr
+XBINDIR = ${XJOVEHOME}/bin
+MANDIR = $(XJOVEHOME)/share/man/man$(MANEXT)
+MANEXT = 1
 
 # The install commands of BSD and System V differ in unpleasant ways:
 # -c: copy (BSD); -c dir: destination directory (SysV)
@@ -55,15 +63,28 @@
 INSTALLFLAGS = # -g bin -o root
 
 # to install executable files
-XINSTALL=cp
+#XINSTALL=cp
 #XINSTALL=/usr/ucb/install $(INSTALLFLAGS) -c -m 755 # -s
+XINSTALL=install -s -m 755
+
+# to install text files
+TINSTALL=install -m 644
+#TINSTALL=cp
+#TINSTALL=/usr/ucb/install $(INSTALLFLAGS) -c -m 644
+#CYGWIN32: TINSTALL=install $(INSTALLFLAGS) -c -m 644
+
+XJOVEM = $(MANDIR)/xjove.$(MANEXT)
+XMANUAL = $(XJOVEM)
 
 C_SRC = jovetool.c xjove.c jovewindows.c xjovewindows.c jovemenu.c \
 	exts.h jovewindows.h mousemsg.h xjovewindows.h
 ICONS = jove.icon jove.cursor copy.cursor cut.cursor paste.cursor
 MISC = Makefile README
+DOCS =  ../doc/xjove.nr
 BACKUPS = $(C_SRC) $(ICONS) $(MISC)
 
+all:	xjove ../doc/xjove.$(MANEXT)
+
 default:		xjove
 
 install:	installxjove
@@ -71,8 +92,10 @@
 .filelist: $(BACKUPS)
 	@ls $(BACKUPS) >.filelist
 
-installxjove:	xjove
-		$(XINSTALL) xjove $(BINDIR)/xjove
+installxjove:	$(XBINDIR) xjove $(XMANUALS)
+		$(XINSTALL) xjove $(XBINDIR)/xjove
+		test -d $(MANDIR) || mkdir -p $(MANDIR)
+		$(TINSTALL) ../doc/xjove.nr $(XJOVEM)
 
 installjovetool:	jovetool
 		$(XINSTALL) jovetool $(BINDIR)/jovetool
@@ -85,7 +108,7 @@
 jovewindows.o:	jovewindows.c jovemenu.c exts.h jovewindows.h ../tune.h
 
 xjove:	xjove.o xjovewindows.o
-		$(CC) $(OPTFLAGS) $(LDFLAGS) $(XJLDFLAGS) -o xjove xjove.o xjovewindows.o -lxview -lolgx -lX11
+		$(CC) $(OPTFLAGS) $(LDFLAGS) $(XJLDFLAGS) -o xjove xjove.o xjovewindows.o -lxview -lX11
 
 xjove.o:	xjove.c exts.h mousemsg.h $(ICONS)
 		$(CC) $(CFLAGS) $(XJCFLAGS) -c xjove.c
@@ -96,6 +119,9 @@
 tags:	$(C_SRC)
 	ctags -w $(C_SRC)
 
+$(XMANUALS): doc/xjove.nr
+	$(TINSTALL) doc/xjove.nr $(XJOVEM)
+
 # override CIFLAGS with something like:
 # CIFLAGS = -m'some reason for change' -u4.14.10.n -q
 
@@ -107,3 +133,9 @@
 
 clobber:	clean
 	rm -f *.orig *.rej
+
+
+#
+
+$(XBINDIR)::
+	test -d $(XBINDIR) || mkdir -p $(XBINDIR)
--- jove-4.16.0.72.orig/doc/jove.nr
+++ jove-4.16.0.72/doc/jove.nr
@@ -158,7 +158,7 @@
 .I n
 windows (if
 .I n
-is ommitted, it is taken to be 2).
+is omitted, it is taken to be 2).
 Subsequent files in the list are read in and displayed in succeeding windows.
 .SH "RECOVERING BUFFERS AFTER A CRASH"
 The
@@ -257,7 +257,7 @@
 terminal, it should also be possible to view the keyboard layout with
 the keychart macro.
 .LP
-If you're not familar with the EMACS command set, it would be worth your
+If you're not familiar with the EMACS command set, it would be worth your
 while to use run TEACHJOVE.  Do do that, just type ``teachjove'' to your shell
 and you will be placed in JOVE in a file which contains directions.  I highly
 recommend this for beginners; you may save yourself a lot of time and
--- jove-4.16.0.72.orig/doc/intro.nr
+++ jove-4.16.0.72/doc/intro.nr
@@ -55,10 +55,9 @@
 .ps \\n(PS
 ..
 .
-.\" Change the extra vertical spacing around .DS/.DE
-.\" Does not work with groff's version of MS (GS is 1 iff groff MS)
-.if !\n(GS .if n .nr DD 0v
-.if !\n(GS .if t .nr DD \n(PD/2u
+.\" Set the extra vertical spacing around .DS/.DE
+.if n .nr DD 0v
+.if t .nr DD \n(PD/2u
 .
 .nr LL 6.5i
 .nr LT 6.5i
@@ -152,7 +151,7 @@
 }
 
 _	
-\fBJOVE\ (C OvrWt)\ \ \ [Main:1]\ \ "hello.c"\ \ \(**\ \ /home/foo\fP	<\ the Mode Line
+\fBJOVE\ (C OvrWt)\ \ \ [Main:1]\ \ "hello.c"\ \ \(**\ \ /home/foo\ \ \ \ 15:23\fP	<\ the Mode Line
 _	
 : write-file (default hello.c) aloha.c\^\(sq 	<\ the Message Line
 =	
@@ -1978,7 +1977,7 @@
 \ \ \ \ return 0;	<\ second Window
 }\^\(sq
 _	
-\fBJOVE\ (C OvrWt)\ \ \ [Main:1]\ \ "aloha.c"\ \ \-\-\ \ /home/foo\fP	<\ the Mode Line
+\fBJOVE\ (C OvrWt)\ \ \ [Main:1]\ \ "aloha.c"\ \ \-\-\ \ /home/foo\ \ \ \ 15:28\fP	<\ the Mode Line
 _	
 [Point pushed]	<\ the Message Line
 =	
@@ -3132,9 +3131,9 @@
 .LP
 The format of the mode line is controlled by the variable \fImode-line\fP.
 Here is a suggested setting.
-.DS
-%[Jove%]%w%w%c(%M)%3c[%b:%n]%2c"%f"%2c%m\(**-%m\(**-%2c%p%2s%(%d%e(%t)%)
-.DE
+.RS
+set mode-line %[Jove%]%w%w%c(%M)%3c[%b:%n]%2c"%f"%2c%m\(**-%m\(**-%2c%p%2s%(%d%e(%t)%)
+.RE
 .LP
 and here is what it all means.
 .IP %[\^...\^%] 12n
--- jove-4.16.0.72.orig/doc/jem.rc
+++ jove-4.16.0.72/doc/jem.rc
@@ -0,0 +1,61 @@
+# Jove Einsteiger Menue
+#
+# $Id: jem.rc,v 1.2 1995/03/03 16:46:44 gerold Exp $
+# $Log: jem.rc,v $
+# Revision 1.2  1995/03/03  16:46:44  gerold
+# Use "pushlibd" to locate JEM related files.
+#
+# Revision 1.1  1995/03/03  16:43:11  gerold
+# Initial revision
+#
+####################################################################
+# Macro definitions
+#
+define-macro help-window ^[xselect-buffer *hilfe*^M^[xpushlibd^M^[xinsert-file jem1.txt^M^[xmake-buffer-unmodified^M^[xread-only-mode^M^[xwindow-find^Mb^M^[8^[xgrow-window^M^[xpopd^M
+#
+define-macro save-and-exit ^[xsave-file^M^[xexit-jove^M
+#
+define-macro about-jove ^[xpushlibd^M^[xshell-command-with-typeout cat jem1.hlp^M^[xpopd^M
+#
+define-macro abort-jove ^[xmake-buffer-unmodified^M^[xexit-jove^My^M
+#
+####################################################################
+# functionkeys for vt100, these are always defined
+#
+# F1
+bind-macro-to-key save-and-exit OP
+# F2
+bind-to-key save-file OQ
+# F3
+bind-macro-to-key about-jove OR
+# F4
+bind-macro-to-key abort-jove OS
+#
+####################################################################
+#
+# funktionkeys for xterm
+ifenv TERM xterm\|xterms
+    # F1
+    bind-macro-to-key save-and-exit [11~
+    # F2
+    bind-to-key save-file [12~
+    # F3
+    bind-macro-to-key about-jove [13~
+    # F4
+    bind-macro-to-key abort-jove [14~
+endif
+####################################################################
+# funktionkeys for sun / sun-cmd
+#
+ifenv TERM sun\|sun-cmd
+    # F1
+    bind-macro-to-key save-and-exit 
+    # F2
+    bind-to-key save-file 
+    # F3
+    bind-macro-to-key about-jove 
+    # F4
+    bind-macro-to-key abort-jove 
+endif
+#
+execute-macro help-window
--- jove-4.16.0.72.orig/doc/xjove.nr
+++ jove-4.16.0.72/doc/xjove.nr
@@ -1,6 +1,6 @@
 .TH XJOVE 1 "8 July 1993"
 .SH NAME
-Xjove, Jovetool \- run JOVE under X-windows or Sunview with function-key and mouse support.
+Xjove \- run JOVE under X-windows with function-key and mouse support.
 .SH SYNOPSIS
 .B xjove
 [
@@ -13,23 +13,10 @@
 [
 args
 \&.\|.\|. ]
-.br
-.B jovetool
-[
-.I window_args
-] [
-.B \-nf
-] [
-.BI \-rc \ run_command_path
-]\&.\|.\|.
-[
-.I args
-\&.\|.\|. ]
+
 .SH DESCRIPTION
 .I Xjove
-(or
-.IR Jovetool )
-creates an XView or SunView frame and a tty subwindow within which mouse events
+creates an XView frame and a tty subwindow within which mouse events
 and function keys are translated to ASCII sequences which JOVE can
 parse.  The translated input events are sent to the process running in
 the tty subwindow, which is typically JOVE.
--- jove-4.16.0.72.orig/doc/jem1.hlp
+++ jove-4.16.0.72/doc/jem1.hlp
@@ -0,0 +1,16 @@
+What is JOVE?
+
+JOVE is Jonathan's Own Version of Emacs.  It is based on the original EMACS
+editor written at MIT by Richard Stallman.  Although JOVE is meant to be
+compatible with EMACS, there are some major differences between the two
+editors and you shouldn't rely on their behaving identically.
+
+It is configured to enable novices to edit Email, programs and other text,
+because the UNIX-Standard-Editor 'vi' isn't the best choice for Newbies.
+Other, easy to use editors often require a graphical Desktop, which can't be
+provided everywhere.
+
+To start learning about the functions of JOVE run the Tutorial 'teachjove'. 
+
+To disable the Beginners Menu, you can simply type 'touch $HOME/.joverc'. You
+can also define your personal configuration in that file.
--- jove-4.16.0.72.orig/doc/jem1.txt
+++ jove-4.16.0.72/doc/jem1.txt
@@ -0,0 +1,3 @@
+    ====================== JOVE Beginners-Menu ======================
+F1: Save and Exit (C-X s C-X C-C)    F2: Save (C-X S)
+F3: Information about JOVE           F4: Exit without Saving (C-X C-C)
--- jove-4.16.0.72.orig/doc/jove.rc
+++ jove-4.16.0.72/doc/jove.rc
@@ -11,9 +11,15 @@
 # It is placed in the kill ring for subsequent yanking.
 define-macro kill-line ^[xbeginning-of-line^M^[xset-mark^M^[xnext-line^M^[xkill-region^M^[xpop-mark^M
 
+# This macro sets a right margin, used below for setting a maximum row length.
+define-macro nice-right-margin ^[xset right-margin 70^M
+
 # Set fill mode when Jove is fired up automatically by certain
 # mail/news readers.
-1 auto-execute-command auto-fill-mode /tmp/\{Re\|article\|rnmail\|pn\}
+1 auto-execute-command auto-fill-mode /tmp/\{Re\|article\|rnmail\|snd\.\|nn\.\|post\|mutt\|pn\}
+
+# Set right margin for mail, to prevent long lines.
+1 auto-execute-macro nice-right-margin /tmp/\{Re\|article\|rnmail\|snd\.\|nn\.\|post\|mutt\|pn\}
 
 # The following is if you prefer fill-mode to be on for all
 # files except the ones you want it off for (but on the other hand it could
@@ -22,13 +28,13 @@
 
 # Sets auto-fill-mode for every file and then turns it off as required.
 # 1 auto-execute-command auto-fill-mode .*
-# 0 auto-execute-command auto-fill-mode .*\.[lcChyfp]$\|.*\.lisp$\|.*\.scm$\|.*\.c++$
+# 0 auto-execute-command auto-fill-mode .*\.[lcChyfp]$\|.*\.lisp$\|.*\.pl$\|.*\.scm$\|.*\.c++$
 
 # set various language modes.
-1 auto-execute-command c-mode .*\.[cChy]$\|.*\.c++$
+1 auto-execute-command c-mode .*\.[cChy]$\|.*\.c++$\|.*\.pl$
 1 auto-execute-command lisp-mode .*\.l$\|.*\.lisp$\|.*\.scm$
 # all the languages need show-match-mode.
-1 auto-execute-command show-match-mode .*\.[lcChyfp]$\|.*\.lisp$\|.*\.scm$\|.*\.c++$
+1 auto-execute-command show-match-mode .*\.[lcChyfp]$\|.*\.lisp$\|.*\.scm$\|.*\.c++$\|.*\.pl$
 
 # if you have job control, this puts Jove out of the way temporarily.
 bind-to-key pause-jove ^[S
@@ -70,10 +76,16 @@
 # This causes the previous file version to remain as '#filename~'.
 # set make-backup-files on
 
+if sh -c 'test ! -f $HOME/.joverc'
+    source jem.rc
+    auto-execute-command delete-other-windows .*/teach-jove
+endif
+
+
 # source any TERMinal-specific rc file
 1 source jove.rc.$TERM
 
 # source local custom rc file, if present
-1 source jove-local.rc
+1 source /etc/jove/jove-local.rc
 
 popd