Greg Minshall | 28 Apr 20:48
Picon
Favicon

q? on manual (hooks)

Bill,

i'm working on learning how to customize.  (a little knowledge...)

in the manual, you give an example of using folder-mode-hook.  you have
something like:
----
     (defvar my-mh-init-done nil
       "Non-`nil' when one-time MH-E settings made.")
     (defun my-mh-folder-mode-hook ()
...
             (setq my-mh-init-done t))))
     (add-hook 'mh-folder-mode-hook 'my-mh-folder-mode-hook)
----
to make sure the hook is only run once.

i'm curious why not use remove-hook inside my-mh-folder-mode-hook to
remove itself as a hook?  i would think that would be more efficient
(you wouldn't even call my-mh-folder-mode-hook after the first time
folder mode runs).  but, i suspect the intricacies of
emacs/emacs-lisp/mh-e may be responsible.

cheers, Greg

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone

Gmane