home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.emacs
- Path: sparky!uunet!charon.amdahl.com!pacbell.com!sgiblab!daver!cypress.com!news
- From: rbv@cypress.com
- Subject: ELISP help needed
- Message-ID: <1992Nov11.171318.29255@cypress.com>
- Sender: news@cypress.com
- Nntp-Posting-Host: cymru.cypress.com
- Organization: Cypress Semiconductor, San Jose, CA, USA
- Date: Wed, 11 Nov 1992 17:13:18 GMT
- Lines: 34
-
- gerdh@ims.com (Gerd Hoeren) writes:
-
- I'd like to connect an elisp function to the find-file-hooks and
- write-file-hooks. I seem to be missing something in my elisp syntax
- though.
-
- Suppose my function is just:
-
- (defun xyzzy ()
- (message "hello"))
-
- And I do an:
-
- (setq find-file-hooks 'xyzzy)
-
- Assuming you have function and variable documentation installed, try this:
-
- <BACKSPACE>v find-file-hook <RETURN>
-
- You will see:
-
- find-file-hooks's value is nil
-
- Documentation:
- List of functions to be called after a buffer is loaded from a file.
- ^^^^
- The buffer's local variables (if any) will have been processed before the
- functions are called.
-
- so, you try
-
- (setq find-file-hooks '(xyzzy))
-
- -- Roger
-