From: Magnus Henoch Date: Wed, 8 Nov 2006 00:13:00 +0000 (+0000) Subject: (url-retrieve-synchronously): Allow quitting when inhibit-quit is t. X-Git-Tag: emacs-pretest-22.0.91~224 X-Git-Url: https://code.delx.au/gnu-emacs/commitdiff_plain/947612be2c71d2478179694e8dfa538b9e8e07c1 (url-retrieve-synchronously): Allow quitting when inhibit-quit is t. --- diff --git a/lisp/url/ChangeLog b/lisp/url/ChangeLog index 678e7e5a8d..2f03b9e9d6 100644 --- a/lisp/url/ChangeLog +++ b/lisp/url/ChangeLog @@ -1,3 +1,8 @@ +2006-11-08 Magnus Henoch + + * url.el (url-retrieve-synchronously): Allow quitting when + inhibit-quit is t. + 2006-11-03 Shun-ichi GOTO (tiny change) * url-http.el (url-http-handle-authentication): If there are diff --git a/lisp/url/url.el b/lisp/url/url.el index 6e4dfa089e..a95c7e39c0 100644 --- a/lisp/url/url.el +++ b/lisp/url/url.el @@ -246,10 +246,16 @@ no further processing). URL is either a string or a parsed URL." ;; interrupt it before it got a chance to handle process input. ;; `sleep-for' was tried but it lead to other forms of ;; hanging. --Stef - (unless (or (accept-process-output proc) (null proc)) + (unless (or (with-local-quit + (accept-process-output proc)) + (null proc)) ;; accept-process-output returned nil, maybe because the process - ;; exited (and may have been replaced with another). - (setq proc (get-buffer-process asynch-buffer)))))) + ;; exited (and may have been replaced with another). If we got + ;; a quit, just stop. + (when quit-flag + (delete-process proc)) + (setq proc (and (not quit-flag) + (get-buffer-process asynch-buffer))))))) asynch-buffer))) (defun url-mm-callback (&rest ignored)