Subject: Re: bug#34763: 27.0.50; url-retrieve-synchronously misbehaves inside eldoc-documentation-function

From: Eli Zaretskii <[email-masked]>
Date: Tue, 12 Mar 2019 19:18:55 +0200

> Cc: [email-masked]
> From: Dmitry Gutov <[email-masked]>
> Date: Tue, 12 Mar 2019 11:08:06 +0200
> 
> On 11.03.2019 16:30, Eli Zaretskii wrote:
> 
> > Does it help to replace this:
> > 
> >    (defsubst url-http-debug (&rest args)
> >      (if quit-flag
> > 
> > with this:
> > 
> >    (defsubst url-http-debug (&rest args)
> >      (if (eq quit-flag t)
> > 
> > in url-http.el?
> 
> No change, unfortunately. I double-checked.

Crystal ball says there _was_ in fact a change: the error message text
has changed slightly.  Which means there's one more place with a
similar problem.

The below should fix both; please see if it does, and also whether it
fixes your original real-life use case.

Thanks.

diff --git a/lisp/url/url-http.el b/lisp/url/url-http.el
index 76faac1..651a2cc 100644
--- a/lisp/url/url-http.el
+++ b/lisp/url/url-http.el
@@ -150,7 +150,7 @@ url-https-default-port
 ;; These routines will allow us to implement persistent HTTP
 ;; connections.
 (defsubst url-http-debug (&rest args)
-  (if quit-flag
+  (if (eq quit-flag t)
       (let ((proc (get-buffer-process (current-buffer))))
 	;; The user hit C-g, honor it!  Some things can get in an
 	;; incredibly tight loop (chunked encoding)
diff --git a/lisp/url/url-util.el b/lisp/url/url-util.el
index cb80ec6..72ff4f1 100644
--- a/lisp/url/url-util.el
+++ b/lisp/url/url-util.el
@@ -61,7 +61,7 @@ url-debug
 
 ;;;###autoload
 (defun url-debug (tag &rest args)
-  (if quit-flag
+  (if (eq quit-flag t)
       (error "Interrupted!"))
   (if (or (eq url-debug t)
 	  (numberp url-debug)