home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / emacs / 3557 < prev    next >
Encoding:
Text File  |  1992-11-15  |  1.8 KB  |  50 lines

  1. Newsgroups: comp.emacs
  2. Path: sparky!uunet!munnari.oz.au!metro!mama!bing!rwhitby
  3. From: rwhitby@research.canon.oz.au (Rod Whitby)
  4. Subject: Re: Setting file-hooks (was Re: ELISP help needed)
  5. In-Reply-To: ethanb@ptolemy.astro.washington.edu's message of 12 Nov 92 05:39:26 GMT
  6. Message-ID: <RWHITBY.92Nov16085647@bing.research.canon.oz.au>
  7. Originator: rwhitby@bing
  8. Sender: news@research.canon.oz.au
  9. Organization: Canon Information Systems Research, Australia
  10. References: <1992Nov10.213638.11986@ims.com>
  11.     <ETHANB.92Nov11213926@ptolemy.astro.washington.edu>
  12. Date: Sun, 15 Nov 1992 22:56:47 GMT
  13. Lines: 35
  14.  
  15. > From: ethanb@ptolemy.astro.washington.edu (Ethan Bradford)
  16. > Newsgroups: comp.emacs
  17. > Date: 12 Nov 92 05:39:26 GMT
  18. > The variables find-file-hooks and write-file-hooks expect their values
  19. > to be *lists* of functions.  Thus, 
  20. >       (defun xyzzy ()
  21. >         (message "hello"))
  22. >       (setq find-file-hooks '(xyzzy))
  23. > Will do what you were attempting, except that it will eliminate any
  24. > other functions you already had in that variable.  It is better to do
  25. >   (setq find-file-hooks (cons 'xyzzy find-file-hooks))
  26. > to add your new function.
  27.  
  28. I have recently put an elisp package in the elisp archive that
  29. uniquely prepends, postpends and deletes functions from hooks.
  30.  
  31.        GNU Emacs Lisp Code Directory Apropos -- "unique-hooks"
  32. "~/" refers to archive.cis.ohio-state.edu:/pub/gnu/emacs/elisp-archive/
  33.  
  34. unique-hooks          92-09-23
  35.      Rod Whitby, <rwhitby@research.canon.oz.au>
  36.      ~/functions/unique-hooks.el.Z
  37.      Prepend, postpend and delete unique hook functions.
  38.  
  39. -- 
  40. --------------------------------------------- _--_|\  |
  41. Rod Whitby (rwhitby@research.canon.oz.au)    /      \ |
  42. Canon Information Systems Research Australia \_.--._/ |
  43. 1 Thomas Holt Drive, North Ryde, N.S.W., 2113.     v  |
  44.