+2006-04-26 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * url-gw.el (url-open-stream): Don't hide errors.
+ (url-gateway-nslookup-host, url-open-telnet): Use with-current-buffer.
+
+ * url-handlers.el (url-insert): New function.
+ (url-insert-file-contents): Use it.
+
2006-03-29 Stefan Monnier <monnier@iro.umontreal.ca>
* url-handlers.el (url-handler-directory-file-name): New handler.
url-gateway-nslookup-program host))
(res host))
(set-process-query-on-exit-flag proc nil)
- (save-excursion
- (set-buffer (process-buffer proc))
+ (with-current-buffer (process-buffer proc)
(while (memq (process-status proc) '(run open))
(accept-process-output proc))
(goto-char (point-min))
(defun url-open-telnet (name buffer host service)
(if (not (stringp service))
(setq service (int-to-string service)))
- (save-excursion
- (set-buffer (get-buffer-create buffer))
+ (with-current-buffer (get-buffer-create buffer)
(erase-buffer)
(let ((proc (start-process name buffer "telnet" "-8"))
(case-fold-search t))
(otherwise
(error "Bad setting of url-gateway-method: %s"
url-gateway-method)))))
- (error
- (setq conn nil)))
+ ;; Ignoring errors here seems wrong. E.g. it'll throw away the
+ ;; error signalled two lines above. It was also found inconvenient
+ ;; during debugging.
+ ;; (error
+ ;; (setq conn nil))
+ )
conn)))
(provide 'url-gw)
-;;; arch-tag: 1c4c0317-6d03-45b8-b3f3-838bd8f9d838
+;; arch-tag: 1c4c0317-6d03-45b8-b3f3-838bd8f9d838
;;; url-gw.el ends here