summaryrefslogtreecommitdiff
path: root/lisp/url/url-history.el
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>2005-12-01 19:15:13 +0000
committerRichard M. Stallman <rms@gnu.org>2005-12-01 19:15:13 +0000
commit1942d6ccfd54b9b2cf75ee4590d0319045b0e132 (patch)
tree5244077e32c788197b5fa6f62e03e6d2f1abf3d1 /lisp/url/url-history.el
parent11b5750f1289917958c99276c5336fade689aef6 (diff)
downloademacs-1942d6ccfd54b9b2cf75ee4590d0319045b0e132.tar.gz
(url-history-track): Call url-history-setup-save-timer in :set function.
:type allows three alternatives. (url-history-setup-save-timer): Test url-history-track.
Diffstat (limited to 'lisp/url/url-history.el')
-rw-r--r--lisp/url/url-history.el14
1 files changed, 10 insertions, 4 deletions
diff --git a/lisp/url/url-history.el b/lisp/url/url-history.el
index 6da5dd91551..a847b26cec2 100644
--- a/lisp/url/url-history.el
+++ b/lisp/url/url-history.el
@@ -38,11 +38,17 @@
:group 'url)
(defcustom url-history-track nil
- "*Controls whether to keep a list of all the URLS being visited.
-If non-nil, url will keep track of all the URLS visited.
+ "*Controls whether to keep a list of all the URLs being visited.
+If non-nil, the URL package will keep track of all the URLs visited.
If set to t, then the list is saved to disk at the end of each Emacs
session."
- :type 'boolean
+ :set #'(lambda (var val)
+ (set-default var val)
+ (and (bound-and-true-p 'url-setup-done)
+ (url-history-setup-save-timer)))
+ :type '(choice (const :tag "off" nil)
+ (const :tag "on" t)
+ (const :tag "within session" 'session))
:group 'url-history)
(defcustom url-history-file nil
@@ -89,7 +95,7 @@ to run the `url-history-setup-save-timer' function manually."
(cond ((fboundp 'cancel-timer) (cancel-timer url-history-timer))
((fboundp 'delete-itimer) (delete-itimer url-history-timer))))
(setq url-history-timer nil)
- (if url-history-save-interval
+ (if (and (eq url-history-track t) url-history-save-interval)
(setq url-history-timer
(cond
((fboundp 'run-at-time)