summaryrefslogtreecommitdiff
path: root/lisp/url
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2006-03-06 03:17:00 +0000
committerStefan Monnier <monnier@iro.umontreal.ca>2006-03-06 03:17:00 +0000
commit8dff56def5e9eb439d7ec3abd70e5e4320fffe73 (patch)
treec3c9dcddf85cfd1c0bc6afc62190a773d6811d4a /lisp/url
parent50e3e56454a5ea2dc65bc41d5c4eaa4b6f942dfd (diff)
downloademacs-8dff56def5e9eb439d7ec3abd70e5e4320fffe73.tar.gz
(url-http-find-free-connection): Don't kill the process
when killing the temp buffer. (url-http-symbol-value-in-buffer): Massage to make it clear to the byte-compiler that the function is defined.
Diffstat (limited to 'lisp/url')
-rw-r--r--lisp/url/ChangeLog7
-rw-r--r--lisp/url/url-http.el19
2 files changed, 18 insertions, 8 deletions
diff --git a/lisp/url/ChangeLog b/lisp/url/ChangeLog
index cb002731eec..b5bc07cb170 100644
--- a/lisp/url/ChangeLog
+++ b/lisp/url/ChangeLog
@@ -1,3 +1,10 @@
+2006-03-05 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * url-http.el (url-http-find-free-connection): Don't kill the process
+ when killing the temp buffer.
+ (url-http-symbol-value-in-buffer): Massage to make it clear to the
+ byte-compiler that the function is defined.
+
2006-02-20 Stefan Monnier <monnier@iro.umontreal.ca>
* url.el (url-redirect-buffer): New var.
diff --git a/lisp/url/url-http.el b/lisp/url/url-http.el
index 22ca6010ef9..a4a01958b2d 100644
--- a/lisp/url/url-http.el
+++ b/lisp/url/url-http.el
@@ -121,7 +121,10 @@ request.")
(let ((buf (generate-new-buffer " *url-http-temp*")))
;; `url-open-stream' needs a buffer in which to do things
;; like authentication. But we use another buffer afterwards.
- (unwind-protect (url-open-stream host buf host port)
+ (unwind-protect
+ (let ((proc (url-open-stream host buf host port)))
+ ;; Drop the temp buffer link before killing the buffer.
+ (set-process-buffer proc nil))
(kill-buffer buf)))))))
;; Building an HTTP request
@@ -1109,15 +1112,15 @@ CBARGS as the arguments."
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; file-name-handler stuff from here on out
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-(if (not (fboundp 'symbol-value-in-buffer))
- (defun url-http-symbol-value-in-buffer (symbol buffer
- &optional unbound-value)
+(defalias 'url-http-symbol-value-in-buffer
+ (if (fboundp 'symbol-value-in-buffer)
+ 'symbol-value-in-buffer
+ (lambda (symbol buffer &optional unbound-value)
"Return the value of SYMBOL in BUFFER, or UNBOUND-VALUE if it is unbound."
(with-current-buffer buffer
- (if (not (boundp symbol))
- unbound-value
- (symbol-value symbol))))
- (defalias 'url-http-symbol-value-in-buffer 'symbol-value-in-buffer))
+ (if (not (boundp symbol))
+ unbound-value
+ (symbol-value symbol))))))
(defun url-http-head (url)
(let ((url-request-method "HEAD")