Commits

daiki  committed 0ec8ed7

* timer-funcs.el (with-timeout): Return the result of
TIMEOUT-FORMS if the timeout expires.

  • Participants
  • Parent commits a82aef7

Comments (0)

Files changed (2)

+2006-07-25  Daiki Ueno  <ueno@unixuser.org>
+
+	* timer-funcs.el (with-timeout): Return the result of
+	TIMEOUT-FORMS if the timeout expires.
+
 2006-07-25  Jerry James  <james@xemacs.org>
 
 	* comint.el (comint-inhibit-carriage-motion): default to t to

File timer-funcs.el

     `(let ((with-timeout-tag (cons nil nil))
 	   with-timeout-value with-timeout-timer)
        (unwind-protect
-	   (when (catch with-timeout-tag
+	   (if (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
+	       ,@timeout-forms
 	     with-timeout-value)
 	 (delete-itimer with-timeout-timer)))))