]> git.eshelyaron.com Git - emacs.git/commitdiff
(url-history-track): Call url-history-setup-save-timer in :set function.
authorRichard M. Stallman <rms@gnu.org>
Thu, 1 Dec 2005 19:15:13 +0000 (19:15 +0000)
committerRichard M. Stallman <rms@gnu.org>
Thu, 1 Dec 2005 19:15:13 +0000 (19:15 +0000)
:type allows three alternatives.
(url-history-setup-save-timer): Test url-history-track.

lisp/url/ChangeLog
lisp/url/url-history.el

index 9a8c8955fc53f20a9c2fa580fad981864927e9c8..c7379715df611e3de43be9c1f98186286b400a43 100644 (file)
@@ -1,3 +1,11 @@
+2005-12-01  Klaus Straubinger  <KSNetz@Arcor.DE>  (tiny change)
+
+       * url-history.el (url-history-track):
+       Call url-history-setup-save-timer in :set function.
+       :type allows three alternatives.
+       (url-history-setup-save-timer): Test url-history-track.
+       * url.el (url-retrieve): Test url-history-track.
+
 2005-11-18  Stefan Monnier  <monnier@iro.umontreal.ca>
 
        * url-http.el: Use with-current-buffer.
index 6da5dd915514d6c2d6c7aefcfbbef9f8366d70be..a847b26cec23cd8ca210bb4ce20cdce22ebc586d 100644 (file)
   :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 (bound-and-true-p 'url-setup-done)
+               (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
@@ -89,7 +95,7 @@ to run the `url-history-setup-save-timer' function manually."
     (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)