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

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

Re: Temporarily suppress a hook?


From: Skip Montanaro
Subject: Re: Temporarily suppress a hook?
Date: Sun, 8 Jul 2018 20:39:47 -0500

> I have before-save-hook defined in ~/.emacs
> > (add-hook 'before-save-hook 'delete-trailing-whitespace)


Both `add-hook' and `remove-hook' take an optional
> LOCAL argument, to affect only the current buffer
> (the buffer-local value of the hook).
>

It's not clear how that helps me. In essentially every other file I edit, I
want to delete trailing whitespace, so I enable it globally. It seems
buffer-local enabling of that hook would be appropriate if I only
occasionally wanted to enable it.

Skip

>


reply via email to

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