unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Klaus Straubinger <KSNetz@Arcor.DE>
Subject: Re: url-history.el: variable url-history-track defined but not used
Date: Mon, 28 Nov 2005 16:31:08 +0100 (CET)	[thread overview]
Message-ID: <m38xv8u6v7.fsf@P131831.SAP.Corp> (raw)
In-Reply-To: <m33bll5996.fsf@P131831.SAP.Corp>

> 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

  reply	other threads:[~2005-11-28 15:31 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-11-25 10:09 url-history.el: variable url-history-track defined but not used Klaus Straubinger
2005-11-28 15:31 ` Klaus Straubinger [this message]
2005-11-29  3:11   ` Richard M. Stallman
2005-11-30 16:59     ` Klaus Straubinger
2005-12-02  2:07       ` Richard M. Stallman
2005-12-02 15:41         ` Klaus Straubinger
2005-12-04 21:19           ` Richard M. Stallman
2005-12-07 15:41             ` Klaus Straubinger
2005-12-08  4:55               ` Richard M. Stallman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m38xv8u6v7.fsf@P131831.SAP.Corp \
    --to=ksnetz@arcor.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).