From: Ivan Shmakov Date: Sun, 7 Dec 2014 19:38:38 +0000 (+0100) Subject: eww history restoration fix X-Git-Tag: emacs-25.0.90~2635^2~173 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=b9ad615e658803846192340d18919f3c7ac9b94e;p=emacs.git eww history restoration fix Fixes: debbugs:18550 * net/eww.el (eww-list-histories): Restore the history in the correct buffer. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 287352cdb0d..c9e5bd7793a 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2014-12-07 Ivan Shmakov + + * net/eww.el (eww-list-histories): Restore the history in the + correct buffer (bug#18550). + 2014-12-07 Lars Magne Ingebrigtsen * net/eww.el (eww-bookmark-prepare): Display URLs in first by diff --git a/lisp/net/eww.el b/lisp/net/eww.el index c1ba4294905..f74f0eff38b 100644 --- a/lisp/net/eww.el +++ b/lisp/net/eww.el @@ -1584,9 +1584,11 @@ Differences in #targets are ignored." (interactive) (when (null eww-history) (error "No eww-histories are defined")) - (let ((eww-history-trans eww-history)) + (let ((eww-history-trans eww-history) + (buffer (current-buffer))) (set-buffer (get-buffer-create "*eww history*")) (eww-history-mode) + (setq-local eww-current-buffer buffer) (let ((inhibit-read-only t) (domain-length 0) (title-length 0) @@ -1615,7 +1617,10 @@ Differences in #targets are ignored." (let ((history (get-text-property (line-beginning-position) 'eww-history))) (unless history (error "No history on the current line")) - (quit-window) + (let ((buffer eww-current-buffer)) + (quit-window) + (when buffer + (switch-to-buffer buffer))) (eww-restore-history history))) (defvar eww-history-mode-map