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: Wed, 30 Nov 2005 17:59:05 +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 1133398284 851 80.91.229.2 (1 Dec 2005 00:51:24 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 1 Dec 2005 00:51:24 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Dec 01 01:51:15 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1EhceG-00037o-CN for ged-emacs-devel@m.gmane.org; Thu, 01 Dec 2005 01:50:08 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EhceF-0000RD-Eg for ged-emacs-devel@m.gmane.org; Wed, 30 Nov 2005 19:50:07 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Ehcav-0007uB-Ex for emacs-devel@gnu.org; Wed, 30 Nov 2005 19:46:41 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Ehcaq-0007qL-RY for emacs-devel@gnu.org; Wed, 30 Nov 2005 19:46:40 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ehcaq-0007pp-8E for emacs-devel@gnu.org; Wed, 30 Nov 2005 19:46:36 -0500 Original-Received: from [155.56.68.170] (helo=smtpde02.sap-ag.de) by monty-python.gnu.org with esmtp (Exim 4.34) id 1Ehcaq-0002PW-7v for emacs-devel@gnu.org; Wed, 30 Nov 2005 19:46:36 -0500 Original-Received: from sap-ag.de (smtpde02) by smtpde02.sap-ag.de (out) with ESMTP id RAA08251 for ; Wed, 30 Nov 2005 17:59:05 +0100 (MEZ) Original-Received: from P131831.SAP.Corp ([10.18.75.39]) by sap.corp (8.8.8/8.8.8) with ESMTP id RAA01474 for ; Wed, 30 Nov 2005 17:59:05 +0100 (MET) 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:46836 Archived-At: > + (and (featurep 'url) > + (fboundp #'url-history-setup-save-timer) > > Those tests are rather undesirable; it would be better for > this to work regardless of what else is loaded. Now that I come to think about it, in my opinion the whole of the :set function could be reduced to :set #'(lambda (var val) (set-default var val) (if (bound-and-true-p url-setup-done) (url-history-setup-save-timer))) because the test (fboundp 'url-history-setup-save-timer) (let ((def (symbol-function 'url-history-setup-save-timer))) (not (and (listp def) (eq 'autoload (car def))))) seems to only test if url-history-setup-save-timer is really available. > What is the reason for those tests? I suspect the variable url-history-save-interval previously had been defined somewhere else, probably in url-vars.el. > What problem do they solve? That function to be called is not available and that the URL library is not loaded when the customize :set function gets called. You don't want to save periodically the URL history if the URL library is not even initialized. The function url-do-setup calls (url-history-setup-save-timer) anyway. > Let's look for another solution. The test for (featurep 'url) could be replaced by a test for the variable url-setup-done as I suggested above. All changes should be made to the :set function in the defcustom for url-history-save-interval as well because I copied it from there in the first place. -- Klaus Straubinger