What code do i need to implement in order to create a hook which can be set by the user and which is called in my own function?

  • You might want to provide an example where you'd want to do that, to clarify your question. – Stefan Oct 10 '20 at 21:31

Welcome to SE (emacs)! Look up run-hooks which gives the whole story but the tl;dr is expose a hook variable my-fancy-hook to the user and at the right place in yr own code put:

(run-hooks 'my-fancy-hook)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.