aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIvan Shmakov2014-11-19 18:28:19 +0100
committerLars Magne Ingebrigtsen2014-11-19 18:28:19 +0100
commit8d5bfc4900dbda0425c2db780bc1bed607167d2a (patch)
tree765549f826d61e091a6db2c0edae9298e94029ea
parenta8995cae4c5daecee3fb2ee8dc2348eedc340af1 (diff)
downloademacs-8d5bfc4900dbda0425c2db780bc1bed607167d2a.tar.gz
emacs-8d5bfc4900dbda0425c2db780bc1bed607167d2a.zip
(eww-history-limit): New variable.
* net/eww.el (eww-history-limit): New variable. (eww-save-history): Use it.
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/net/eww.el9
2 files changed, 13 insertions, 1 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 4c8a48b40cd..1194ba7aa7c 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
12014-11-19 Ivan Shmakov <ivan@siamics.net>
2
3 * net/eww.el (eww-history-limit): New variable.
4 (eww-save-history): Use it.
5
12014-11-19 Lars Magne Ingebrigtsen <larsi@gnus.org> 62014-11-19 Lars Magne Ingebrigtsen <larsi@gnus.org>
2 7
3 * net/eww.el (eww-desktop-misc-data): Use `cl-remove-duplicates'. 8 * net/eww.el (eww-desktop-misc-data): Use `cl-remove-duplicates'.
diff --git a/lisp/net/eww.el b/lisp/net/eww.el
index 76e14be4d79..83d96f50b1a 100644
--- a/lisp/net/eww.el
+++ b/lisp/net/eww.el
@@ -95,6 +95,12 @@ The string will be passed through `substitute-command-keys'."
95 :group 'eww 95 :group 'eww
96 :type 'string) 96 :type 'string)
97 97
98(defcustom eww-history-limit 50
99 "Maximum number of entries to retain in the history."
100 :version "25.1"
101 :group 'eww
102 :type '(choice (const :tag "Unlimited" nil)
103 integer))
98(defcustom eww-use-external-browser-for-content-type 104(defcustom eww-use-external-browser-for-content-type
99 "\\`\\(video/\\|audio/\\|application/ogg\\)" 105 "\\`\\(video/\\|audio/\\|application/ogg\\)"
100 "Always use external browser for specified content-type." 106 "Always use external browser for specified content-type."
@@ -1487,7 +1493,8 @@ Differences in #targets are ignored."
1487 (setq eww-data (list :title "")) 1493 (setq eww-data (list :title ""))
1488 ;; Don't let the history grow infinitely. We store quite a lot of 1494 ;; Don't let the history grow infinitely. We store quite a lot of
1489 ;; data per page. 1495 ;; data per page.
1490 (when-let (tail (nthcdr 50 eww-history)) 1496 (when-let (tail (and eww-history-limit
1497 (nthcdr eww-history-limit eww-history)))
1491 (setcdr tail nil))) 1498 (setcdr tail nil)))
1492 1499
1493(defun eww-list-histories () 1500(defun eww-list-histories ()