1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2025-01-03 11:33:37 +00:00

eww bookmark window restoration

* net/eww.el (eww-bookmark-browse): Use `quit-window' to restore
the window configuration.
This commit is contained in:
Lars Ingebrigtsen 2013-12-24 19:07:55 +01:00
parent a50fa60572
commit eeef121a18
2 changed files with 5 additions and 5 deletions

View File

@ -1,3 +1,8 @@
2013-12-24 Lars Ingebrigtsen <larsi@gnus.org>
* net/eww.el (eww-bookmark-browse): Use `quit-window' to restore
the window configuration.
2013-12-24 Eli Zaretskii <eliz@gnu.org> 2013-12-24 Eli Zaretskii <eliz@gnu.org>
* net/eww.el (eww-open-file): Ensure 3 slashes after "file:" when * net/eww.el (eww-open-file): Ensure 3 slashes after "file:" when

View File

@ -1086,8 +1086,6 @@ Differences in #targets are ignored."
;;; Bookmarks code ;;; Bookmarks code
(defvar eww-bookmarks nil) (defvar eww-bookmarks nil)
(defvar eww-previous-window-configuration nil)
(make-variable-buffer-local 'eww-previous-window-configuration)
(defun eww-add-bookmark () (defun eww-add-bookmark ()
"Add the current page to the bookmarks." "Add the current page to the bookmarks."
@ -1132,7 +1130,6 @@ Differences in #targets are ignored."
(unless eww-bookmarks (unless eww-bookmarks
(user-error "No bookmarks are defined")) (user-error "No bookmarks are defined"))
(set-buffer (get-buffer-create "*eww bookmarks*")) (set-buffer (get-buffer-create "*eww bookmarks*"))
(setq eww-previous-window-configuration (current-window-configuration))
(eww-bookmark-mode) (eww-bookmark-mode)
(let ((format "%-40s %s") (let ((format "%-40s %s")
(inhibit-read-only t) (inhibit-read-only t)
@ -1191,8 +1188,6 @@ Differences in #targets are ignored."
(unless bookmark (unless bookmark
(user-error "No bookmark on the current line")) (user-error "No bookmark on the current line"))
(quit-window) (quit-window)
(when eww-previous-window-configuration
(set-window-configuration eww-previous-window-configuration))
(eww-browse-url (plist-get bookmark :url)))) (eww-browse-url (plist-get bookmark :url))))
(defun eww-next-bookmark () (defun eww-next-bookmark ()