Mercurial > emacs
comparison lisp/url/url.el @ 73814:22da3e31207f
(url-retrieve-synchronously): Allow quitting when inhibit-quit is t.
author | Magnus Henoch <mange@freemail.hu> |
---|---|
date | Wed, 08 Nov 2006 00:12:52 +0000 |
parents | 147c5e159c28 |
children | a4a6a88fed98 c71725faff1a |
comparison
equal
deleted
inserted
replaced
73813:ceca912e4479 | 73814:22da3e31207f |
---|---|
244 ;; We used to use `sit-for' here, but in some cases it wouldn't | 244 ;; We used to use `sit-for' here, but in some cases it wouldn't |
245 ;; work because apparently pending keyboard input would always | 245 ;; work because apparently pending keyboard input would always |
246 ;; interrupt it before it got a chance to handle process input. | 246 ;; interrupt it before it got a chance to handle process input. |
247 ;; `sleep-for' was tried but it lead to other forms of | 247 ;; `sleep-for' was tried but it lead to other forms of |
248 ;; hanging. --Stef | 248 ;; hanging. --Stef |
249 (unless (or (accept-process-output proc) (null proc)) | 249 (unless (or (with-local-quit |
250 (accept-process-output proc)) | |
251 (null proc)) | |
250 ;; accept-process-output returned nil, maybe because the process | 252 ;; accept-process-output returned nil, maybe because the process |
251 ;; exited (and may have been replaced with another). | 253 ;; exited (and may have been replaced with another). If we got |
252 (setq proc (get-buffer-process asynch-buffer)))))) | 254 ;; a quit, just stop. |
255 (when quit-flag | |
256 (delete-process proc)) | |
257 (setq proc (and (not quit-flag) | |
258 (get-buffer-process asynch-buffer))))))) | |
253 asynch-buffer))) | 259 asynch-buffer))) |
254 | 260 |
255 (defun url-mm-callback (&rest ignored) | 261 (defun url-mm-callback (&rest ignored) |
256 (let ((handle (mm-dissect-buffer t))) | 262 (let ((handle (mm-dissect-buffer t))) |
257 (url-mark-buffer-as-dead (current-buffer)) | 263 (url-mark-buffer-as-dead (current-buffer)) |