GNU bug report logs -
#23963
25.0.95; Feature request: setup-unwind-protect, complementing unwind-protect
Previous Next
Full log
Message #8 received at 23963 <at> debbugs.gnu.org (full text, mbox):
Markus Triska <triska <at> metalevel.at> writes:
> With this primitive, we could write the example above as:
>
> (setup-unwind-protect
> (setq process (ftp-...))
> (progn
> ;; use process ...
> (delete-process process))
Given my dislike of `setq` I'd rather use something else.
This said, we also have another problem: if the user hits C-g twice
in a row, the second may interrupt the `delete-process` itself.
So I think what we "really" want is more like
(let ((oi inhibit-quit)
(inhibit-quit t))
(let ((process (ftp-...)))
(unwind-protect
(let ((inhibit-quit oi))
..use process..)
(delete-process process))))
At the same time, any function whose name starts with "ftp-" is likely
a bad candidate for running it in a context where it can't be
interrupted (it's likely that in various circumstances it could hang, in
which case the user should be able to hit C-g).
Stefan
This bug report was last modified 7 years and 140 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.