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

  1. Newsgroups: comp.emacs
  2. Path: sparky!uunet!charon.amdahl.com!pacbell.com!sgiblab!daver!cypress.com!news
  3. From: rbv@cypress.com
  4. Subject: ELISP help needed
  5. Message-ID: <1992Nov11.171318.29255@cypress.com>
  6. Sender: news@cypress.com
  7. Nntp-Posting-Host: cymru.cypress.com
  8. Organization: Cypress Semiconductor, San Jose, CA, USA
  9. Date: Wed, 11 Nov 1992 17:13:18 GMT
  10. Lines: 34
  11.  
  12. gerdh@ims.com (Gerd Hoeren) writes:
  13.  
  14.     I'd like to connect an elisp function to the find-file-hooks and
  15.     write-file-hooks.  I seem to be missing something in my elisp syntax
  16.     though.
  17.  
  18.     Suppose my function is just:
  19.  
  20.           (defun xyzzy ()
  21.         (message "hello"))
  22.  
  23.     And I do an:
  24.  
  25.           (setq find-file-hooks 'xyzzy)
  26.  
  27. Assuming you have function and variable documentation installed, try this:
  28.  
  29. <BACKSPACE>v find-file-hook <RETURN>
  30.  
  31. You will see:
  32.  
  33.       find-file-hooks's value is nil
  34.  
  35.       Documentation:
  36.       List of functions to be called after a buffer is loaded from a file.
  37.       ^^^^
  38.       The buffer's local variables (if any) will have been processed before the
  39.       functions are called.
  40.  
  41. so, you try
  42.  
  43.     (setq find-file-hooks '(xyzzy))
  44.  
  45. -- Roger
  46.