[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master 01/01: (eww-history-limit): New variable.
From: |
Lars Ingebrigtsen |
Subject: |
[Emacs-diffs] master 01/01: (eww-history-limit): New variable. |
Date: |
Wed, 19 Nov 2014 17:28:53 +0000 |
branch: master
commit 8d5bfc4900dbda0425c2db780bc1bed607167d2a
Author: Ivan Shmakov <address@hidden>
Date: Wed Nov 19 18:28:19 2014 +0100
(eww-history-limit): New variable.
* net/eww.el (eww-history-limit): New variable.
(eww-save-history): Use it.
---
lisp/ChangeLog | 5 +++++
lisp/net/eww.el | 9 ++++++++-
2 files changed, 13 insertions(+), 1 deletions(-)
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 4c8a48b..1194ba7 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
+2014-11-19 Ivan Shmakov <address@hidden>
+
+ * net/eww.el (eww-history-limit): New variable.
+ (eww-save-history): Use it.
+
2014-11-19 Lars Magne Ingebrigtsen <address@hidden>
* net/eww.el (eww-desktop-misc-data): Use `cl-remove-duplicates'.
diff --git a/lisp/net/eww.el b/lisp/net/eww.el
index 76e14be..83d96f5 100644
--- a/lisp/net/eww.el
+++ b/lisp/net/eww.el
@@ -95,6 +95,12 @@ The string will be passed through `substitute-command-keys'."
:group 'eww
:type 'string)
+(defcustom eww-history-limit 50
+ "Maximum number of entries to retain in the history."
+ :version "25.1"
+ :group 'eww
+ :type '(choice (const :tag "Unlimited" nil)
+ integer))
(defcustom eww-use-external-browser-for-content-type
"\\`\\(video/\\|audio/\\|application/ogg\\)"
"Always use external browser for specified content-type."
@@ -1487,7 +1493,8 @@ Differences in #targets are ignored."
(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))
+ (when-let (tail (and eww-history-limit
+ (nthcdr eww-history-limit eww-history)))
(setcdr tail nil)))
(defun eww-list-histories ()
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] master 01/01: (eww-history-limit): New variable.,
Lars Ingebrigtsen <=