+2014-12-07 Ivan Shmakov <ivan@siamics.net>
+
+ * net/eww.el (eww): Moved history recording here...
+ (eww-browse-url): ... from here (bug#19253).
+
+ * net/eww.el (eww-browse-url): Use generate-new-buffer (was:
+ iterating over possible buffer names.)
+
2014-12-07 Lars Magne Ingebrigtsen <larsi@gnus.org>
* net/eww.el (eww-reload): Take a prefix to work locally (bug#19086).
(setq url (concat url "/"))))
(setq url (concat eww-search-prefix
(replace-regexp-in-string " " "+" url))))))
- (unless (eq major-mode 'eww-mode)
+ (if (eq major-mode 'eww-mode)
+ (when (or (plist-get eww-data :url)
+ (plist-get eww-data :dom))
+ (eww-save-history))
(eww-setup-buffer)
(plist-put eww-data :url url)
(eww-update-header-line-format)
;;;###autoload
(defun eww-browse-url (url &optional new-window)
(cond (new-window
- (let ((new-buffer "*eww*")
- (num 0))
- (while (get-buffer new-buffer)
- (setq num (1+ num)
- new-buffer (format "*eww*<%d>" num)))
- (switch-to-buffer new-buffer))
- (eww-mode))
- ((and (equal major-mode 'eww-mode)
- (plist-get eww-data :url))
- (eww-save-history)))
+ (switch-to-buffer (generate-new-buffer "*eww*"))
+ (eww-mode)))
(eww url))
(defun eww-back-url ()