Smarter delete-trailing-whitespace
This commit is contained in:
parent
81c58e0efa
commit
9577ec28c7
2 changed files with 4 additions and 13 deletions
|
@ -157,14 +157,5 @@ spaces on either side of the point if so. Resorts to
|
|||
(align-regexp beg end
|
||||
(concat "\\(\\s-*\\)" (rxt-pcre-to-elisp regexp)) 1 1)))
|
||||
|
||||
;;;###autoload
|
||||
(defun narf:toggle-delete-trailing-whitespace ()
|
||||
(interactive)
|
||||
(if (memq 'delete-trailing-whitespace before-save-hook)
|
||||
(progn (message "Remove trailing whitespace: OFF")
|
||||
(remove-hook 'before-save-hook 'delete-trailing-whitespace))
|
||||
(message "Remove trailing whitespace: ON")
|
||||
(add-hook 'before-save-hook 'delete-trailing-whitespace)))
|
||||
|
||||
(provide 'defuns-whitespace)
|
||||
;;; defuns-whitespace.el ends here
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue