help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: minor-mode hook not run


From: John Shahid
Subject: Re: minor-mode hook not run
Date: Tue, 20 Mar 2018 16:31:53 -0400
User-agent: mu4e 1.0-alpha3; emacs 27.0.50

i think the hook will be called `foo-hook' not `foo-mode-hook'

Andreas Röhler <andreas.roehler@easy-emacs.de> writes:

> Hi,
>
> writing a minor-mode, whose hook should do some setup
>
> (define-minor-mode foo
>   "Do something" nil " FOO"}
>   :keymap foo-map
>   (cond
>    ((eq major-mode 'abc)
>     (add-hook 'foo-mode-hook 'foo-load-abc nil t)
>     ;; (funcall 'foo-load-abc)
> )
> ...
>
> Unfortunately, while the function ‘foo-load-abc-mode’ is present in the hook,
> it is not called.
>
> While uncommenting the funcall shown would set up the vars.
>
> Any idea, while this as a hook has no effect?
>
> Thanks,
>
> Andreas




reply via email to

[Prev in Thread] Current Thread [Next in Thread]