unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Why adding this write-file-hook makes save-buffer not work anymore!??
@ 2003-08-28 19:14 Christian Seberino
  2003-08-28 20:06 ` Kai Großjohann
  0 siblings, 1 reply; 5+ messages in thread
From: Christian Seberino @ 2003-08-28 19:14 UTC (permalink / raw)


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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2003-08-31 11:50 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-08-28 19:14 Why adding this write-file-hook makes save-buffer not work anymore!?? Christian Seberino
2003-08-28 20:06 ` Kai Großjohann
2003-08-29  2:46   ` Christian Seberino
2003-08-29  8:24     ` Joakim Hove
2003-08-31 11:50       ` Alan Mackenzie

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).