|
From: | Lute Kamstra |
Subject: | Re: How delete whitespace at END of file automatically when save and exit file? |
Date: | Thu, 21 Aug 2003 08:39:45 +0200 |
User-agent: | Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3.50 (gnu/linux) |
Jose A. Ortega Ruiz <jao@member.fsf.org> writes: > (defun my-delete-trailing-lines () > (goto-char (point-max)) > (delete-blank-lines)) > > (add-hook 'write-file-hooks 'my-delete-trailing-lines) In addition, (setq next-line-add-newlines nil) helps to prevent inserting empty lines at the end of files. Lute -- (spook) => "Compsec USDOJ CIDA" (insert-file-contents "~/.signature") => (error "`~/.signature' too rude")
[Prev in Thread] | Current Thread | [Next in Thread] |