I would like to run delete-trailing-whitespace
for files with extension .yaml
only. Can someone please supply the elisp to do this?
1 Answer
(add-hook 'yaml-mode-hook
(lambda ()
(add-hook 'before-save-hook
#'delete-trailing-whitespace
nil "local")))