🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.emacs
Article #3298

Re: Setting file-hooks (was Re: ELISP help needed)

#3298
From: Rod Whitby
Date: Sun, 15 Nov 1992 22:56
35 lines
1875 bytes
> From: ethanb@ptolemy.astro.washington.edu (Ethan Bradford)
> Newsgroups: comp.emacs
> Date: 12 Nov 92 05:39:26 GMT
> 
> The variables find-file-hooks and write-file-hooks expect their values
> to be *lists* of functions.  Thus, 
> 
>       (defun xyzzy ()
>         (message "hello"))
> 
>       (setq find-file-hooks '(xyzzy))
> 
> Will do what you were attempting, except that it will eliminate any
> other functions you already had in that variable.  It is better to do
> 
>   (setq find-file-hooks (cons 'xyzzy find-file-hooks))
> 
> to add your new function.

I have recently put an elisp package in the elisp archive that
uniquely prepends, postpends and deletes functions from hooks.

       GNU Emacs Lisp Code Directory Apropos -- "unique-hooks"
"~/" refers to archive.cis.ohio-state.edu:/pub/gnu/emacs/elisp-archive/

unique-hooks	      92-09-23
     Rod Whitby, <rwhitby@research.canon.oz.au>
     ~/functions/unique-hooks.el.Z
     Prepend, postpend and delete unique hook functions.

-- 
--------------------------------------------- _--_|\  |
Rod Whitby (rwhitby@research.canon.oz.au)    /      \ |
Canon Information Systems Research Australia \_.--._/ |
1 Thomas Holt Drive, North Ryde, N.S.W., 2113.     v  |
Technical Details
Message-ID: <RWHITBY.92Nov16085647@bing.research.canon.oz.au>
Path: arc1-ca.pugleaf.net!sparky!uunet!munnari.oz.au!metro!mama!bing!rwhitby
References: <1992Nov10.213638.11986@ims.com> <ETHANB.92Nov11213926@ptolemy.astro.washington.edu>

Show Full Headers
Complete Article Headers
Newsgroups: comp.emacs
Path: arc1-ca.pugleaf.net!sparky!uunet!munnari.oz.au!metro!mama!bing!rwhitby
From: rwhitby@research.canon.oz.au (Rod Whitby)
Subject: Re: Setting file-hooks (was Re: ELISP help needed)
In-Reply-To: ethanb@ptolemy.astro.washington.edu's message of 12 Nov 92 05:39:26 GMT
Message-ID: <RWHITBY.92Nov16085647@bing.research.canon.oz.au>
Originator: rwhitby@bing
Sender: news@research.canon.oz.au
Organization: Canon Information Systems Research, Australia
References: <1992Nov10.213638.11986@ims.com>
 <ETHANB.92Nov11213926@ptolemy.astro.washington.edu>
Date: Sun, 15 Nov 1992 22:56:47 GMT
Lines: 35