emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/url/url-gw.el


From: Stefan Monnier
Subject: [Emacs-diffs] Changes to emacs/lisp/url/url-gw.el
Date: Wed, 26 Apr 2006 20:40:18 +0000

Index: emacs/lisp/url/url-gw.el
diff -u emacs/lisp/url/url-gw.el:1.12 emacs/lisp/url/url-gw.el:1.13
--- emacs/lisp/url/url-gw.el:1.12       Sun Feb  5 23:15:07 2006
+++ emacs/lisp/url/url-gw.el    Wed Apr 26 20:40:18 2006
@@ -118,8 +118,7 @@
                                 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))
@@ -168,8 +167,7 @@
 (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))
@@ -261,11 +259,15 @@
                         (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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]