Hello,

Michael Brand <michael.ch.br...@gmail.com> writes:

> First, I have an understanding question:
>
> I tried to find where org-mode-hook is called within the function
> org-mode but could not see something similar to the expected
> "(run-hooks 'org-mode-hook)". So I added 'backtrace to the
> org-mode-hook but don't understand it either:
>
>     (backtrace)
>       backtrace()
>       run-hooks(change-major-mode-after-body-hook text-mode-hook
> outline-mode-hook org-mode-hook)
>       apply(run-hooks (change-major-mode-after-body-hook
> text-mode-hook outline-mode-hook org-mode-hook))
>       run-mode-hooks(org-mode-hook)
>       org-mode()
>       [...]
>
> I see the expected "run-mode-hooks(org-mode-hook)" in this backtrace
> but where is the corresponding form in the function org-mode?

It is implied by `define-derived-mode'.

> Second, I guess it is not necessary to implement something like
> org-mode-early-hook but I could not find yet an existing hook. Which
> hook would you recommend for inserting the leading stars?

I didn't look at your code, but can't you `defadvice' `org-mode'?


Regards,

-- 
Nicolas Goaziou

Reply via email to