aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Magne Ingebrigtsen2014-11-10 21:44:33 +0100
committerLars Magne Ingebrigtsen2014-11-10 21:44:33 +0100
commit6019446af60a8a4a7abe63b38791c3d738f7a44e (patch)
treee9fe0c30c81bc95979aaa5617d6688dd99485ca4
parentf40090876cdab1b13faa660b202037738df98409 (diff)
downloademacs-6019446af60a8a4a7abe63b38791c3d738f7a44e.tar.gz
emacs-6019446af60a8a4a7abe63b38791c3d738f7a44e.zip
(eww-save-history): Don't let the history grow infinitely.
-rw-r--r--lisp/ChangeLog1
-rw-r--r--lisp/net/eww.el6
2 files changed, 6 insertions, 1 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index bc31f5d14bb..1eb7ca9cb2e 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -5,6 +5,7 @@
5 variables `eww-current-url', `eww-current-dom', 5 variables `eww-current-url', `eww-current-dom',
6 `eww-current-source', and `eww-current-title'. 6 `eww-current-source', and `eww-current-title'.
7 (eww-readable): Copy over pertinent data from the parent page. 7 (eww-readable): Copy over pertinent data from the parent page.
8 (eww-save-history): Don't let the history grow infinitely.
8 9
9 * net/eww.el: Remove `eww-next-url', `eww-previous-url', 10 * net/eww.el: Remove `eww-next-url', `eww-previous-url',
10 `eww-up-url', `eww-home-url', `eww-start-url' and 11 `eww-up-url', `eww-home-url', `eww-start-url' and
diff --git a/lisp/net/eww.el b/lisp/net/eww.el
index b697fa32f4b..76fb0c8743f 100644
--- a/lisp/net/eww.el
+++ b/lisp/net/eww.el
@@ -1344,7 +1344,11 @@ Differences in #targets are ignored."
1344 (plist-put eww-data :point (point)) 1344 (plist-put eww-data :point (point))
1345 (plist-put eww-data :text (buffer-string)) 1345 (plist-put eww-data :text (buffer-string))
1346 (push eww-data eww-history) 1346 (push eww-data eww-history)
1347 (setq eww-data (list :title ""))) 1347 (setq eww-data (list :title ""))
1348 ;; Don't let the history grow infinitely. We store quite a lot of
1349 ;; data per page.
1350 (when-let (tail (nthcdr 50 eww-history))
1351 (setcdr tail nil)))
1348 1352
1349(defun eww-list-histories () 1353(defun eww-list-histories ()
1350 "List the eww-histories." 1354 "List the eww-histories."