home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / emacs / 3519 < prev    next >
Encoding:
Text File  |  1992-11-11  |  1.1 KB  |  36 lines

  1. Path: sparky!uunet!gumby!yale!yale.edu!think.com!barmar
  2. From: barmar@think.com (Barry Margolin)
  3. Newsgroups: comp.emacs
  4. Subject: Re: ELISP help needed
  5. Date: 11 Nov 1992 20:22:44 GMT
  6. Organization: Thinking Machines Corporation, Cambridge MA, USA
  7. Lines: 23
  8. Message-ID: <1drq2kINNk90@early-bird.think.com>
  9. References: <1992Nov10.213638.11986@ims.com>
  10. NNTP-Posting-Host: telecaster.think.com
  11. Keywords: find-file-hooks write-file-hooks
  12.  
  13. In article <1992Nov10.213638.11986@ims.com> gerdh@ims.com (Gerd Hoeren) writes:
  14. >And I do an:
  15. >
  16. >      (setq find-file-hooks 'xyzzy)
  17. >
  18. >Then, the next find-file will complain about:
  19. >
  20. >      Wrong type argument: sequencep, xyzzy
  21. >
  22. >If I do the same with the write-file-hooks, I get:
  23. >
  24. >      Wrong type argument: listp, xyzzy
  25.  
  26. Notice that the names of the variables are -hooks, plural.  As it says in
  27. the built-in documentation (viewable with describe-variable, "C-h v"),
  28. these should contain a "list of functions".  Therefore you should do
  29.  
  30. (setq find-file-hooks (cons 'xyzzy find-file-hooks))
  31. -- 
  32. Barry Margolin
  33. System Manager, Thinking Machines Corp.
  34.  
  35. barmar@think.com          {uunet,harvard}!think!barmar
  36.