1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2025-02-07 20:54:32 +00:00

(eww-save-history): Don't let the history grow infinitely.

This commit is contained in:
Lars Magne Ingebrigtsen 2014-11-10 21:44:33 +01:00
parent f40090876c
commit 6019446af6
2 changed files with 6 additions and 1 deletions

View File

@ -5,6 +5,7 @@
variables `eww-current-url', `eww-current-dom',
`eww-current-source', and `eww-current-title'.
(eww-readable): Copy over pertinent data from the parent page.
(eww-save-history): Don't let the history grow infinitely.
* net/eww.el: Remove `eww-next-url', `eww-previous-url',
`eww-up-url', `eww-home-url', `eww-start-url' and

View File

@ -1344,7 +1344,11 @@ Differences in #targets are ignored."
(plist-put eww-data :point (point))
(plist-put eww-data :text (buffer-string))
(push eww-data eww-history)
(setq eww-data (list :title "")))
(setq eww-data (list :title ""))
;; Don't let the history grow infinitely. We store quite a lot of
;; data per page.
(when-let (tail (nthcdr 50 eww-history))
(setcdr tail nil)))
(defun eww-list-histories ()
"List the eww-histories."