[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: url-history.el: variable url-history-track defined but not used
From: |
Klaus Straubinger |
Subject: |
Re: url-history.el: variable url-history-track defined but not used |
Date: |
Mon, 28 Nov 2005 16:31:08 +0100 (CET) |
> In url-history.el, the customizable variable url-history-track is
> defined. However, it is not used anywhere.
The following patch changes this:
--- url-history.el.orig 2005-07-04 14:17:32.000000000 +0200
+++ url-history.el 2005-11-28 16:05:03.000000000 +0100
@@ -37,11 +37,20 @@
: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 (featurep 'url)
+ (fboundp #'url-history-setup-save-timer)
+ (let ((def (symbol-function 'url-history-setup-save-timer)))
+ (not (and (listp def) (eq 'autoload (car def)))))
+ (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
@@ -88,7 +97,7 @@
(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)
--- url.el.orig 2005-10-21 09:22:28.000000000 +0200
+++ url.el 2005-11-28 16:02:57.000000000 +0100
@@ -148,7 +148,8 @@
(if buffer
(with-current-buffer buffer
(apply callback cbargs))))
- (url-history-update-url url (current-time))
+ (if url-history-track
+ (url-history-update-url url (current-time)))
buffer))
(defun url-retrieve-synchronously (url)
--
Klaus Straubinger