summaryrefslogtreecommitdiff
path: root/lisp/url/url-file.el
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2005-06-13 14:32:42 +0000
committerStefan Monnier <monnier@iro.umontreal.ca>2005-06-13 14:32:42 +0000
commit175384d1eef1917a21d73384b8da2de81e1d68ef (patch)
treea14a61f3cbfe2991c21883392f65956cacf28fbb /lisp/url/url-file.el
parentf99ed2f84b36c6b383b213976561d08b10a4192a (diff)
downloademacs-175384d1eef1917a21d73384b8da2de81e1d68ef.tar.gz
(url-file, url-file-asynch-callback): Use with-current-buffer.
Diffstat (limited to 'lisp/url/url-file.el')
-rw-r--r--lisp/url/url-file.el8
1 files changed, 3 insertions, 5 deletions
diff --git a/lisp/url/url-file.el b/lisp/url/url-file.el
index 0aa23acc0ec..c39d255304b 100644
--- a/lisp/url/url-file.el
+++ b/lisp/url/url-file.el
@@ -73,8 +73,7 @@ to them."
func args
args efs))
(let ((size (nth 7 (file-attributes name))))
- (save-excursion
- (set-buffer buff)
+ (with-current-buffer buff
(goto-char (point-max))
(if (/= -1 size)
(insert (format "Content-length: %d\n" size)))
@@ -177,9 +176,8 @@ to them."
(if (file-directory-p filename)
;; A directory is done the same whether we are local or remote
(url-find-file-dired filename)
- (save-excursion
- (setq buffer (generate-new-buffer " *url-file*"))
- (set-buffer buffer)
+ (with-current-buffer
+ (setq buffer (generate-new-buffer " *url-file*"))
(mm-disable-multibyte)
(setq url-current-object url)
(insert "Content-type: " (or content-type "application/octet-stream") "\n")