From: Lars Magne Ingebrigtsen Date: Wed, 26 Jun 2013 17:14:46 +0000 (+0200) Subject: (eww-bookmark-browse): Don't bug out if it's the only window. X-Git-Tag: emacs-24.3.90~173^2^2~42^2~45^2~387^2~1992^2~23 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=47fd571be73e897db743bda64344c87f4e250793;p=emacs.git (eww-bookmark-browse): Don't bug out if it's the only window. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 24cc16ee0e7..cd21329bbfc 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -6,6 +6,7 @@ (eww-add-bookmark): New command. (eww-bookmark-mode): New mode and commands. (eww-add-bookmark): Remove newlines from the title. + (eww-bookmark-browse): Don't bug out if it's the only window. 2013-06-26 Glenn Morris diff --git a/lisp/net/eww.el b/lisp/net/eww.el index cee2146296d..3579f656a1d 100644 --- a/lisp/net/eww.el +++ b/lisp/net/eww.el @@ -1043,7 +1043,10 @@ The browser to used is specified by the `shr-external-browser' variable." (let ((bookmark (get-text-property (line-beginning-position) 'eww-bookmark))) (unless bookmark (error "No bookmark on the current line")) - (delete-window) + ;; We wish to leave this window, but if it's the only window here, + ;; just let it remain. + (ignore-errors + (delete-window)) (eww (plist-get bookmark :url)))) (defun eww-next-bookmark ()