🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.epoch.misc
Article #1666

[Ken Wood: Epoch highlighting packages: tek-epoch-stuff1.0.0 part 1 of 4]

#1666
From: Ken Wood
Date: Wed, 23 Oct 1991 19:55
426 lines
16458 bytes
Well, 3 of the 4 parts of this posting seemed to get lost last time,
so I'll try again.

Ken


------- Start of forwarded message -------
Status: RO
X-VM-v5-Data: ([nil nil nil nil nil nil nil nil nil]
	["14399" "Fri" "18" "October" "91" "18:52:31" "CST" "Ken Wood" "kwood@angels " nil "402" "Epoch highlighting packages: tek-epoch-stuff1.0.0 part 1 of 4" "^From:" nil nil "10"])
Received: from angels.adl.austek (angels.austek) by floyd.adl.austek (4.0/4.2 Austek-CAW)
	id AA13252; Fri, 18 Oct 91 18:52:37 CST
Received: by angels.adl.austek (4.1/4.2 Austek-CAW)
	id AA14797; Fri, 18 Oct 91 18:52:31 CST
Message-Id: <9110180922.AA14797@angels.adl.austek>
X-Face: +Ar(nq[|T7zOhkAD\~cQ9U9>LLq'PDT`!bLk99u`nWaw(-_q8iZ;s;6{VkL^Vl6qq`6'q{h
 /AM&IU4cGo,U!l{@V7fp.3nrk.%5hLaD(i%uQxV1*)xZ^CRV)l4%m2;A"T!j=\rqqdCH3<I}V}
From: kwood@angels (Ken Wood)
To: epoch@cs.uiuc.edu
Subject: Epoch highlighting packages: tek-epoch-stuff1.0.0 part 1 of 4
Date: Fri, 18 Oct 91 18:52:31 CST
Organization: Austek Microsystems, Pty Ltd.


This release is a bundle of emacs-lisp packages for epoch 3.2.2,
mainly related to highlighting. A couple of packages may be of
interest to non-epoch users, namely the manual browser and the
syntax-decode stuff. Read on for details.

I don't have time to look at epoch V4 just now, so if somebody else
would like to port it to V4 please let me know so we can coordinate
our efforts.

If there is enough interest, I will submit this stuff to the lisp code
directory once the first round of bug reports has had a chance to come
in.


Here is a list of the packages included, and a brief overview of their
features:

* Enhanced manual browser: runs in background; supports multiple man
buffers; man buffers are in a special mode with local key & mouse
bindings; sections of man page are highlighted under epoch. I know
there are a lot of manual browsers out there, but I think this one is
pretty neat - check it out and tell me what you think.

* Comment highlighting in source code buffers: comment structure is
determined from the current syntax table; highlighting updated on
find-file and save-buffer. Several other people have released comment
highlighting packages, but this is the most complete & elegant
solution I've seen. Because the comment structure is determined in a
generic manner it will work with any editing mode that has a valid
syntax table. I've tried to optimise it too, and it's reasonably quick.

* Interface to Dave Gillespies info browser (included): provides epoch
mouse bindings and highlighting. Once again, this is the most complete
implementation I've seen, and is reasonably quick (although
suggestions for improving the speed of any of these packages are very
welcome).

* Header highlighting in news articles displayed under GNUS.
Highlights "From:" and "Subject:" fields in news articles.

* Header highlighting in mail messages displayed under VM. Highlights
"From:" and "Subject:" fields in mail messages.

* Customisation of motion highlighting style. Allows you to change the
style used to highlight mouse drag regions by setting X resources.

* The highlighting styles used in all of the above packages are
initialised by a package which looks up the X resource database to
find the appropriate option settings. All of the packages have
sensible defaults though, so you can get started without settting up
any X resources at all: on a color display different colors are used
for highlighting; on a monochrome display an italic or bold font, the
same height and width as the minibuffer font, is used for
highlighting.  See the file tek-style-utils.el for details of how to
customise your highlighting styles.


#! /bin/sh
# This is a shell archive, meaning:
# 1. Remove everything above the #! /bin/sh line.
# 2. Save the resulting text in a file.
# 3. Execute the file with /bin/sh (not csh) to create the files:
#	INSTALL
#	tek-man-setup.el
#	tek-gnus-hilite-setup.el
#	tek-vm-hilite-setup.el
#	epoch-running.el
#	get-font.patch
# This archive created: Fri Oct 18 18:37:24 1991
export PATH; PATH=/bin:$PATH
echo shar: extracting "'INSTALL'" '(1572 characters)'
if test -f 'INSTALL'
then
	echo shar: will not over-write existing file "'INSTALL'"
else
sed 's/^	X//' << \SHAR_EOF > 'INSTALL'
	X Installation instructions for the tek-epoch-stuff group of packages.
	X ====================================================================
	X
	XYou only need to do 3 things to install these packages:
	X
	X1) Apply the patch in get-font.patch to your epoch sources and rebuild
	Xepoch. This patch has been "blessed" by Chris Love, so it should have
	Xbeen included in V4.0 .
	X
	X2) Byte compile each of the .el files and put them somewhere in your
	Xload path.
	X
	X3) Add the following lines to your .emacs:
	X
	X
	X; Set up an autoload for syntax decoding stuff.
	X(autoload 'decode-syntax-table "syntax-decode" "autoloadable function" t)
	X
	X; Set up autoload of new manual browser
	X(require 'tek-man-setup)
	X
	X; Set up autoload of new info browser
	X(require 'tek-info-setup)
	X
	X; Highlight comments in source code
	X(require 'tek-src-hilite-setup)
	X
	X; Customise the mouse drag style
	X(require 'tek-motion-setup)
	X
	X; Set up for highlighting in gnus.
	X(require 'tek-gnus-hilite-setup)
	X
	X; Set up for highlighting in VM.
	X(require 'tek-vm-hilite-setup)
	X
	X
	XObviously you can load just some of the packages and not others. The
	Xsyntax-decode package is used by tek-src-hilite, so you must include
	Xthe above autoload command if you are highlighting your comments.
	X
	XAll the file will byte compile under emacs as well as under epoch. We
	Xuse make and "emacs -batch -f batch-byte-compile" to release byte
	Xcompiled elisp files across our different machines.
	X
	XThe above packages all do something sensible when loaded under emacs,
	Xso you don't need to worry about different .emacs'es for emacs and
	Xepoch.
	X
	X
	X			   === The End ===
SHAR_EOF
if test 1572 -ne "`wc -c < 'INSTALL'`"
then
	echo shar: error transmitting "'INSTALL'" '(should have been 1572 characters)'
fi
fi # end of overwriting check
echo shar: extracting "'tek-man-setup.el'" '(1555 characters)'
if test -f 'tek-man-setup.el'
then
	echo shar: will not over-write existing file "'tek-man-setup.el'"
else
sed 's/^	X//' << \SHAR_EOF > 'tek-man-setup.el'
	X;*****************************************************************************
	X;
	X; Filename:	tek-man-setup.el
	X;
	X; Copyright (C) 1991  Ken Wood
	X;
	X; This program is free software; you can redistribute it and/or modify
	X; it under the terms of the GNU General Public License as published by
	X; the Free Software Foundation; either version 1, or (at your option)
	X; any later version.
	X;
	X; This program is distributed in the hope that it will be useful,
	X; but WITHOUT ANY WARRANTY; without even the implied warranty of
	X; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
	X; GNU General Public License for more details.
	X;
	X; You should have received a copy of the GNU General Public License
	X; along with this program; if not, write to the Free Software
	X; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
	X;
	X; Author:		Ken Wood, <kwood@austek.oz.au>
	X; Organisation:		Austek Microsystems Pty Ltd, Australia.
	X; Released with permission from Austek Microsystems.
	X;
	X; Description:	Set up to use enhanced manual browser.
	X;
	X;		See the INSTALL file that comes with this package for
	X;		installation details.
	X;
	X;*****************************************************************************
	X
	X; $Id: tek-man-setup.el,v 1.4 1991/10/18 07:48:08 kwood Exp $
	X
	X(require 'epoch-running)
	X(provide 'tek-man-setup)
	X
	X(if (fboundp 'manual-entry)
	X    (fmakunbound 'manual-entry))
	X
	X(if (fboundp 'man)
	X    (fmakunbound 'man))
	X
	X; Load emacs-based manual
	X(autoload 'manual-entry "tek-man" "Improved manual browsing" t)
	X(autoload 'man "tek-man" "Improved manual browsing" t)
SHAR_EOF
if test 1555 -ne "`wc -c < 'tek-man-setup.el'`"
then
	echo shar: error transmitting "'tek-man-setup.el'" '(should have been 1555 characters)'
fi
fi # end of overwriting check
echo shar: extracting "'tek-gnus-hilite-setup.el'" '(1548 characters)'
if test -f 'tek-gnus-hilite-setup.el'
then
	echo shar: will not over-write existing file "'tek-gnus-hilite-setup.el'"
else
sed 's/^	X//' << \SHAR_EOF > 'tek-gnus-hilite-setup.el'
	X;*****************************************************************************
	X;
	X; Filename:	tek-gnus-hilite-setup.el
	X;
	X; Copyright (C) 1991  Ken Wood
	X;
	X; This program is free software; you can redistribute it and/or modify
	X; it under the terms of the GNU General Public License as published by
	X; the Free Software Foundation; either version 1, or (at your option)
	X; any later version.
	X;
	X; This program is distributed in the hope that it will be useful,
	X; but WITHOUT ANY WARRANTY; without even the implied warranty of
	X; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
	X; GNU General Public License for more details.
	X;
	X; You should have received a copy of the GNU General Public License
	X; along with this program; if not, write to the Free Software
	X; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
	X;
	X; Author:		Ken Wood, <kwood@austek.oz.au>
	X; Organisation:		Austek Microsystems Pty Ltd, Australia.
	X; Released with permission from Austek Microsystems.
	X;
	X; Description:	Set up highlighting under GNUS if running epoch.
	X;
	X;		See the INSTALL file that comes with this package for
	X;		installation details.
	X;
	X;*****************************************************************************
	X
	X; $Id: tek-gnus-hilite-setup.el,v 1.2 1991/10/18 07:43:32 kwood Exp $
	X
	X(require 'maclib-toolbox)
	X(require 'epoch-running)
	X(provide 'tek-gnus-hilite-setup)
	X
	X(if running-epoch
	X    (progn
	X
	X      (defun tek-init-gnus-hiliting ()
	X	(require 'tek-gnus-hilite)
	X	nil)
	X
	X      (prepend-unique-hook 'gnus-Startup-hook 'tek-init-gnus-hiliting)
	X      ))
SHAR_EOF
if test 1548 -ne "`wc -c < 'tek-gnus-hilite-setup.el'`"
then
	echo shar: error transmitting "'tek-gnus-hilite-setup.el'" '(should have been 1548 characters)'
fi
fi # end of overwriting check
echo shar: extracting "'tek-vm-hilite-setup.el'" '(1530 characters)'
if test -f 'tek-vm-hilite-setup.el'
then
	echo shar: will not over-write existing file "'tek-vm-hilite-setup.el'"
else
sed 's/^	X//' << \SHAR_EOF > 'tek-vm-hilite-setup.el'
	X;*****************************************************************************
	X;
	X; Filename:	tek-vm-hilite-setup.el
	X;
	X; Copyright (C) 1991  Ken Wood
	X;
	X; This program is free software; you can redistribute it and/or modify
	X; it under the terms of the GNU General Public License as published by
	X; the Free Software Foundation; either version 1, or (at your option)
	X; any later version.
	X;
	X; This program is distributed in the hope that it will be useful,
	X; but WITHOUT ANY WARRANTY; without even the implied warranty of
	X; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
	X; GNU General Public License for more details.
	X;
	X; You should have received a copy of the GNU General Public License
	X; along with this program; if not, write to the Free Software
	X; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
	X;
	X; Author:		Ken Wood, <kwood@austek.oz.au>
	X; Organisation:		Austek Microsystems Pty Ltd, Australia.
	X; Released with permission from Austek Microsystems.
	X;
	X; Description:	Set up highlighting under VM if running epoch.
	X;
	X;		See the INSTALL file that comes with this package for
	X;		installation details.
	X;
	X;*****************************************************************************
	X
	X; $Id: tek-vm-hilite-setup.el,v 1.2 1991/10/18 07:44:13 kwood Exp $
	X
	X(require 'maclib-toolbox)
	X(require 'epoch-running)
	X(provide 'tek-vm-hilite-setup)
	X
	X(if running-epoch
	X    (progn
	X
	X      (defun tek-init-vm-hiliting ()
	X	(require 'tek-vm-hilite)
	X	nil)
	X
	X      (prepend-unique-hook 'vm-mode-hooks 'tek-init-vm-hiliting)
	X      ))
SHAR_EOF
if test 1530 -ne "`wc -c < 'tek-vm-hilite-setup.el'`"
then
	echo shar: error transmitting "'tek-vm-hilite-setup.el'" '(should have been 1530 characters)'
fi
fi # end of overwriting check
echo shar: extracting "'epoch-running.el'" '(1087 characters)'
if test -f 'epoch-running.el'
then
	echo shar: will not over-write existing file "'epoch-running.el'"
else
sed 's/^	X//' << \SHAR_EOF > 'epoch-running.el'
	X;*****************************************************************************
	X;
	X; Filename:	epoch-running.el
	X;
	X; Description:	Sets a flag to indicate if user is running Epoch or Emacs.
	X;
	X; Author:	Someone on the net, whose name I forgot.
	X;
	X; This version by:	Ken Wood, <kwood@austek.oz.au>
	X; Organisation:		Austek Microsystems Pty Ltd, Australia.
	X;
	X;		See the INSTALL file that comes with this package for
	X;		installation details.
	X;
	X;*****************************************************************************
	X
	X; $Id: epoch-running.el,v 1.2 1991/10/16 05:25:33 kwood Exp $
	X
	X(provide 'epoch-running)
	X
	X;; epoch-version is an epoch-defined variable whose value is not nil.
	X;; By looking at it you can tell if you are running epoch.  But, on
	X;; the other hand, it doesnt exist in a regular gnuemacs, so defvar-ing
	X;; it to nil here guarantees it will be nil in gnuemacs and non-nil
	X;; in epoch
	X(defvar epoch::version nil)     ;; in epoch this will not set!
	X
	X;; running-epoch is a better name for the variable that tells us is we are
	X;; in epoch or not
	X(setq running-epoch epoch::version)
SHAR_EOF
if test 1087 -ne "`wc -c < 'epoch-running.el'`"
then
	echo shar: error transmitting "'epoch-running.el'" '(should have been 1087 characters)'
fi
fi # end of overwriting check
echo shar: extracting "'get-font.patch'" '(942 characters)'
if test -f 'get-font.patch'
then
	echo shar: will not over-write existing file "'get-font.patch'"
else
sed 's/^	X//' << \SHAR_EOF > 'get-font.patch'
	X*** ../../epoch-3.2.2/src/xutil.c	Fri Jul 19 09:36:33 1991
	X--- xutil.c	Fri Aug 23 16:31:07 1991
	X***************
	X*** 566,571 ****
	X--- 566,573 ----
	X  {
	X    Font font;
	X    BLOCK_INPUT_DECLARE();
	X+   char **tempfontlist;
	X+   int tempfontcount;
	X  
	X    if (XRESOURCEP(name) && XXRESOURCE(name)->type == XA_FONT) return name;
	X  
	X***************
	X*** 572,578 ****
	X    CHECK_STRING(name,0);
	X  
	X    BLOCK_INPUT();
	X!   font = XLoadFont(XD_display,XSTRING(name)->data);
	X    UNBLOCK_INPUT();
	X  
	X    return font ? make_Xresource(XD_display,XD_plane,font,XA_FONT) : Qnil;
	X--- 574,585 ----
	X    CHECK_STRING(name,0);
	X  
	X    BLOCK_INPUT();
	X!   tempfontlist = XListFonts(XD_display,XSTRING(name)->data,1,&tempfontcount);
	X!   if (tempfontcount)
	X!       font = XLoadFont(XD_display,XSTRING(name)->data);
	X!   else
	X!       font = 0;
	X!   XFreeFontNames(tempfontlist);
	X    UNBLOCK_INPUT();
	X  
	X    return font ? make_Xresource(XD_display,XD_plane,font,XA_FONT) : Qnil;
SHAR_EOF
if test 942 -ne "`wc -c < 'get-font.patch'`"
then
	echo shar: error transmitting "'get-font.patch'" '(should have been 942 characters)'
fi
fi # end of overwriting check
#	End of shell archive
exit 0


Ken Wood, Austek Microsystems, Technology Park, Adelaide, SA 5095, Australia
INTERNET:  kwood@austek.oz.au  UUCP: uunet.uu.net!munnari!austek.oz.au!kwood
------- End of forwarded message -------
Technical Details
Message-ID: <9110230425.AA28578@angels.adl.austek>
Path: arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!cis.ohio-state.edu!adl.AUstek.oz.AU!kwood

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: fc7ee,2d26c542e5158809,start
X-Google-Attributes: gidfc7ee,public
X-Google-ArrivalTime: 1991-10-24 09:41:33 PST
Path: arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!cis.ohio-state.edu!adl.AUstek.oz.AU!kwood
From: kwood@adl.AUstek.oz.AU (Ken Wood)
Newsgroups: gnu.epoch.misc
Subject: [Ken Wood: Epoch highlighting packages: tek-epoch-stuff1.0.0 part 1 of 4]
Message-ID: <9110230425.AA28578@angels.adl.austek>
Date: 23 Oct 91 19:55:12 GMT
Sender: daemon@cis.ohio-state.edu
Distribution: gnu
Organization: GNUs Not Usenet
Lines: 426