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

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

Temporarily suppress a hook?


From: Skip Montanaro
Subject: Temporarily suppress a hook?
Date: Sun, 8 Jul 2018 19:02:15 -0500

I have before-save-hook defined in ~/.emacs

(add-hook 'before-save-hook 'delete-trailing-whitespace)

This is useful almost all the time. I just discovered a case where
it's not so helpful (a file full of regular expressions to feed into
"grep -E -f ..."

I can think of various ways to tweak the regular expressions to not
require trailing whitespace, but let's assume for a moment that's not
possible. Is it possible to suppress the before-save-hook on a
per-file basis?

Thx,

Skip



reply via email to

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