[Top][All Lists]

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

Re: Doing things only in a particular mode

From: Dan Espen
Subject: Re: Doing things only in a particular mode
Date: Mon, 24 Aug 2015 11:18:41 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)

Colin Yates <address@hidden> writes:

> (newbie warning).
> So I understand about (add-hook...) but I can't find the hook I
> want. Basically, I have visual-line-mode turned on globally, but I want
> to disable it when I view the headers in mu4e.
> The buffer is called *mu4e-headers* and I can see the major mode is
> mu4e-headers but the following code has no effect:
> (add-hook 'mu4e-headers-hook
>   (lambda ()
>     (visual-line-mode 0)))
> I am not sure how 'hooks' are created - I searched through the source
> code for my4e-headers-hook but couldn't find it.
> Assuming this is the right approach, how can I say 'when the major mode
> is X then do this'. What is the idiomatic Emacs way?

Sorry, I know nothing about mu4e, but the docs seem pretty good.
Here's where they describe the compose mode hook:

Usually I do ^h m (help mode), and the help text mentions the hooks.

Dan Espen

reply via email to

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