From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Klaus Straubinger Newsgroups: gmane.emacs.devel Subject: Re: url-history.el: variable url-history-track defined but not used Date: Mon, 28 Nov 2005 16:31:08 +0100 (CET) Message-ID: References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1133194258 20781 80.91.229.2 (28 Nov 2005 16:10:58 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 28 Nov 2005 16:10:58 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Nov 28 17:10:54 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1EglXI-0003TD-Ic for ged-emacs-devel@m.gmane.org; Mon, 28 Nov 2005 17:07:24 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EglXH-0001Bj-Ta for ged-emacs-devel@m.gmane.org; Mon, 28 Nov 2005 11:07:23 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1EgkyT-0006vV-BP for emacs-devel@gnu.org; Mon, 28 Nov 2005 10:31:25 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1EgkyR-0006uI-CH for emacs-devel@gnu.org; Mon, 28 Nov 2005 10:31:24 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EgkyR-0006u6-7a for emacs-devel@gnu.org; Mon, 28 Nov 2005 10:31:23 -0500 Original-Received: from [155.56.68.170] (helo=smtpde02.sap-ag.de) by monty-python.gnu.org with esmtp (Exim 4.34) id 1EgkyQ-0001Aa-QU for emacs-devel@gnu.org; Mon, 28 Nov 2005 10:31:23 -0500 Original-Received: from sap-ag.de (smtpde02) by smtpde02.sap-ag.de (out) with ESMTP id QAA25000 for ; Mon, 28 Nov 2005 16:31:08 +0100 (MEZ) Original-To: emacs-devel@gnu.org In-Reply-To: X-Mailer: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.4 X-SAP: out X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:46703 Archived-At: > 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