[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Why adding this write-file-hook makes save-buffer not work anymore!??
From: |
Christian Seberino |
Subject: |
Why adding this write-file-hook makes save-buffer not work anymore!?? |
Date: |
28 Aug 2003 12:14:02 -0700 |
I want to delete a lot of whitespace when I save a file so I make
following function be invoked when I write a file....
(defun cs-delete-trailing-whitespace() (interactive)
(delete-trailing-whitespace)
(let ((original-pos (point)))
(goto-char (point-max))
(delete-blank-lines)
(goto-char original-pos)))
and I set up hook like this
(add-hook 'write-file-hooks 'cs-delete-trailing-whitespace)
When I try to do save-buffer it does not work?? What is the problem?!?!
Chris
- Why adding this write-file-hook makes save-buffer not work anymore!??,
Christian Seberino <=