]> git.eshelyaron.com Git - emacs.git/commitdiff
Clean up eww code slightly
authorLars Ingebrigtsen <larsi@gnus.org>
Tue, 2 Feb 2016 04:43:35 +0000 (15:43 +1100)
committerLars Ingebrigtsen <larsi@gnus.org>
Tue, 2 Feb 2016 04:43:35 +0000 (15:43 +1100)
* eww.el (eww-browse-url): Clean up code slightly.

lisp/net/eww.el

index 29cde247e6167326577d5e62c5ceca38df065a78..372b674ecd7ee47e03fb74f4966e75411a69f16a 100644 (file)
@@ -744,9 +744,9 @@ the like."
 
 ;;;###autoload
 (defun eww-browse-url (url &optional new-window)
-  (cond (new-window
-        (switch-to-buffer (generate-new-buffer "*eww*"))
-         (eww-mode)))
+  (when new-window
+    (switch-to-buffer (generate-new-buffer "*eww*"))
+    (eww-mode))
   (eww url))
 
 (defun eww-back-url ()