all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* doubt about mode hooks
@ 2013-06-03 14:51 Luca Ferrari
  2013-06-03 15:21 ` Le Wang
  0 siblings, 1 reply; 3+ messages in thread
From: Luca Ferrari @ 2013-06-03 14:51 UTC (permalink / raw)
  To: help-gnu-emacs

Hi all,
so far I've added mode hooks with something like the following:

(add-hook 'c-mode-hook (lambda()
                          (my-function-hook) )

but then I come across a snippet that does something different:

(setq my-personal-hook 'my-function-hook)
(add-hook c-mode-hook (lambda ()
          (run-hooks 'my-personal-hook) ) t )

so I was wondering what are the differences and which advantages
should I get using the second. I cannot see any particular advantage
from the manual, so I'm guessing the second effectively does not add
the hook itself, rather a function that runs the hook.
Any explaination?

Thanks,
Luca



^ permalink raw reply	[flat|nested] 3+ messages in thread
[parent not found: <mailman.929.1370271116.22516.help-gnu-emacs@gnu.org>]

end of thread, other threads:[~2013-06-03 20:14 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-03 14:51 doubt about mode hooks Luca Ferrari
2013-06-03 15:21 ` Le Wang
     [not found] <mailman.929.1370271116.22516.help-gnu-emacs@gnu.org>
2013-06-03 20:14 ` Emanuel Berg

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.