MD4 support for GNUS (add-hook function)

Johan Vromans jv at mh.nl
Mon May 13 17:38:31 AEST 1991


In article <1991May11.143132.2114 at pronto.mh.nl> jv at mh.nl (Johan Vromans) writes:

   This file defines the functions to have automatic validation and
   insertion of MD4 signatures using GNUS.

To use this, you also need the function add-hook. Here it is --

#!/bin/sh
# This is a shell archive (produced by shar 3.49)
# To extract the files from this archive, save it to a file, remove
# everything above the "!/bin/sh" line above, and type "sh file_name".
#
# made 05/13/1991 07:36 UTC by jv at largo
# Source directory /u1/users/jv
#
# existing files will NOT be overwritten unless -c is specified
#
# This shar contains:
# length  mode       name
# ------ ---------- ------------------------------------------
#    625 -rw-r--r-- add-hook.el
#
# ============= add-hook.el ==============
if test -f 'add-hook.el' -a X"$1" != X"-c"; then
	echo 'x - skipping add-hook.el (File already exists)'
else
echo 'x - extracting add-hook.el (Text)'
sed 's/^X//' << 'SHAR_EOF' > 'add-hook.el' &&
X;; add-hook function by Dan LaLiberte <liberte at cs.uiuc.edu>
X(defun add-hook (hook-var hook-function)
X  "Prepend to the value of HOOK-VAR the function HOOK-FUNCTION, if it
Xis not already an element.
Xhook-var's value may be a single function or a list of functions."
X  (if (boundp hook-var)
X      (let ((value (symbol-value hook-var)))
X	(if (and (listp value) (not (eq (car value) 'lambda)))
X	    (and (not (memq hook-function value))
X		 (set hook-var
X		      (cons hook-function value)))
X	  (and (not (eq hook-function value))
X	       (set hook-var
X		    (list hook-function value)))))
X    (set hook-var hook-function)
X    ))
SHAR_EOF
chmod 0644 add-hook.el ||
echo 'restore of add-hook.el failed'
Wc_c="`wc -c < 'add-hook.el'`"
test 625 -eq "$Wc_c" ||
	echo 'add-hook.el: original size 625, current size' "$Wc_c"
fi
exit 0
-- 
Johan Vromans				       jv at mh.nl via internet backbones
Multihouse Automatisering bv		       uucp: ..!{uunet,hp4nl}!mh.nl!jv
Doesburgweg 7, 2803 PL Gouda, The Netherlands  phone/fax: +31 1820 62911/62500
------------------------ "Arms are made for hugging" -------------------------



More information about the Alt.sources mailing list