kamat@uceng.UC.EDU (Govind N. Kamat) (11/13/89)
A couple of weeks ago, I had posted the following, but didn't receive
any solutions; so here it is again, this time in gnu.emacs.bug.
From: kamat@uceng.UC.EDU (Govind N. Kamat)
Newsgroups: gnu.emacs
Subject: Elisp question
Message-ID: <KAMAT.89Oct30112638@uceng.UC.EDU>
Date: 30 Oct 89 16:26:38 GMT
In some instances, I would like to be able to exit out of the (y/n)
questions asked by save-some-buffers. I could use ^G, but that would
abort any function that calls save-some-buffers too. So, I wrote up
the following:
(defun save-some-buffers-optionally ()
"Save-some-buffers, able to exit on ^G without terminating
calling function."
(condition-case ()
(save-some-buffers)
(quit (beep) (message "Press any key to continue")
(read-char) (sleep-for 1))))
Now, upon a keyboard quit, emacs seems to be suspended (frozen)
until there is some keyboard input. That is why I put in the
read-char. But is there some other way of handling this, so that
an extra key need not be struck?
I get the described behavior when I replace save-some-buffers in
compile.el with save-some buffers-optionally. Quite often, I have a
number of modified buffers which I don't want to save just then, and
it is a little inconvenient to march through "Save (y/n)" questions
always saying "n".
I might very well be doing something wrong, but I would appreciate
knowing what. Is this a feature or a bug? Thanks very much.
--
Govind N. Kamat College of Engineering
kamat@uceng.UC.EDU University of Cincinnati
Cincinnati, OH 45221, USA