From: seberino@spawar.navy.mil (Christian Seberino)
Subject: Why adding this write-file-hook makes save-buffer not work anymore!??
Date: 28 Aug 2003 12:14:02 -0700 [thread overview]
Message-ID: <bf23f78f.0308281114.40b4c114@posting.google.com> (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
next reply other threads:[~2003-08-28 19:14 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-08-28 19:14 Christian Seberino [this message]
2003-08-28 20:06 ` Why adding this write-file-hook makes save-buffer not work anymore!?? Kai Großjohann
2003-08-29 2:46 ` Christian Seberino
2003-08-29 8:24 ` Joakim Hove
2003-08-31 11:50 ` Alan Mackenzie
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=bf23f78f.0308281114.40b4c114@posting.google.com \
--to=seberino@spawar.navy.mil \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.