APPROVE COMMIT
This was posted to -beta a little while ago...
Message-ID: <m364sn2kza.fsf(a)uh-oh.nvidia.com>
After testing, it works great. Thanks very much tbennett!
Norbert, this change will mean that you'll have to roll new packages
for:
apel
bbdb
gnus
liece (shouldn't this be retired now we have Riece?)
net-utils
tramp
xemacs-devel
As well as xemacs-base of course.
NOTE: This patch has been committed.
xemacs-base patch:
ChangeLog files diff command: cvs -q diff -U 0
Files affected: ChangeLog
Source files diff command: cvs -q diff -uN
Files affected: timer-funcs.el
Index: ChangeLog
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/xemacs-base/ChangeLog,v
retrieving revision 1.169
diff -u -p -U0 -r1.169 ChangeLog
--- ChangeLog 24 Jul 2005 09:03:06 -0000 1.169
+++ ChangeLog 11 Oct 2005 11:04:04 -0000
@@ -0,0 +1,6 @@
+2005-10-11 Steve Youngs <steve(a)sxemacs.org>
+
+ * timer-funcs.el (with-timeout): Use `unwind-protect' to ensure
+ the timer is always deleted.
+ From: tbennett(a)nvidia.com
+
Index: timer-funcs.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/xemacs-base/timer-funcs.el,v
retrieving revision 1.1
diff -u -p -u -r1.1 timer-funcs.el
--- timer-funcs.el 22 Oct 2004 15:23:09 -0000 1.1
+++ timer-funcs.el 11 Oct 2005 11:03:50 -0000
@@ -181,16 +181,18 @@ be detected."
(timeout-forms (cdr list)))
`(let ((with-timeout-tag (cons nil nil))
with-timeout-value with-timeout-timer)
- (when (catch with-timeout-tag
- (progn
- (setq with-timeout-timer
- (start-itimer "with-timeout" #'with-timeout-handler
- ,seconds nil nil t with-timeout-tag))
- (setq with-timeout-value (progn ,@body))
- nil))
- ,@timeout-forms
- (delete-itimer with-timeout-timer)
- with-timeout-value))))
+ (unwind-protect
+ (when (catch with-timeout-tag
+ (progn
+ (setq with-timeout-timer
+ (start-itimer "with-timeout" #'with-timeout-handler
+ ,seconds nil nil t with-timeout-tag))
+ (setq with-timeout-value (progn ,@body))
+ nil))
+ ,@timeout-forms
+ with-timeout-value)
+ (delete-itimer with-timeout-timer)))))
+
;;;###autoload
(defun y-or-n-p-with-timeout (prompt seconds default-value)
--
|---<Steve Youngs>---------------<GnuPG KeyID: A94B3003>---|
| I am Dyslexic of Borg. |
| Fusistance is retile. Your arse will be laminated. |
|------------------------------------<steve(a)sxemacs.org>---|