[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: Wed, 7 Dec 2005 16:41:00 +0100 (CET)

> I installed that simplification.  Thanks.

Unfortunately, url-history.el still has the definition of the variable
url-history-list despite the ChangeLog item

        * url-history.el (url-history-list): Var deleted.

Furthermore, I would like to suggest that the simplications done to
url-history.el could also be applied to url-cookie.el as in the
following patch:

--- url-cookie.el.orig  2005-07-04 14:17:02.000000000 +0200
+++ url-cookie.el       2005-12-07 16:36:00.000000000 +0100
@@ -448,11 +448,10 @@
 Default is 1 hour.  Note that if you change this variable outside of
 the `customize' interface after `url-do-setup' has been run, you need
 to run the `url-cookie-setup-save-timer' function manually."
-  :set (function (lambda (var val)
-                  (set-default var val)
-                  (and (featurep 'url)
-                       (fboundp 'url-cookie-setup-save-timer)
-                       (url-cookie-setup-save-timer))))
+  :set #'(lambda (var val)
+          (set-default var val)
+          (if (bound-and-true-p url-setup-done)
+              (url-cookie-setup-save-timer)))
   :type 'integer
   :group 'url)
@@ -460,21 +459,12 @@
 (defun url-cookie-setup-save-timer ()
   "Reset the cookie saver timer."
-  (ignore-errors
-    (cond ((fboundp 'cancel-timer) (cancel-timer url-cookie-timer))
-         ((fboundp 'delete-itimer) (delete-itimer url-cookie-timer))))
+  (ignore-errors (cancel-timer url-cookie-timer))
   (setq url-cookie-timer nil)
   (if url-cookie-save-interval
-      (setq url-cookie-timer
-           (cond
-            ((fboundp 'run-at-time)
-             (run-at-time url-cookie-save-interval
-                          url-cookie-save-interval
-                          'url-cookie-write-file))
-            ((fboundp 'start-itimer)
-             (start-itimer "url-cookie-saver" 'url-cookie-write-file
-                           url-cookie-save-interval
-                           url-cookie-save-interval))))))
+      (setq url-cookie-timer (run-at-time url-cookie-save-interval
+                                         url-cookie-save-interval
+                                         #'url-cookie-write-file))))
 (provide 'url-cookie)

reply via email to

[Prev in Thread] Current Thread [Next in Thread]