diff options
| author | Richard M. Stallman | 2005-12-01 19:15:13 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 2005-12-01 19:15:13 +0000 |
| commit | 1942d6ccfd54b9b2cf75ee4590d0319045b0e132 (patch) | |
| tree | 5244077e32c788197b5fa6f62e03e6d2f1abf3d1 | |
| parent | 11b5750f1289917958c99276c5336fade689aef6 (diff) | |
| download | emacs-1942d6ccfd54b9b2cf75ee4590d0319045b0e132.tar.gz emacs-1942d6ccfd54b9b2cf75ee4590d0319045b0e132.zip | |
(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.
| -rw-r--r-- | lisp/url/ChangeLog | 8 | ||||
| -rw-r--r-- | lisp/url/url-history.el | 14 |
2 files changed, 18 insertions, 4 deletions
diff --git a/lisp/url/ChangeLog b/lisp/url/ChangeLog index 9a8c8955fc5..c7379715df6 100644 --- a/lisp/url/ChangeLog +++ b/lisp/url/ChangeLog | |||
| @@ -1,3 +1,11 @@ | |||
| 1 | 2005-12-01 Klaus Straubinger <KSNetz@Arcor.DE> (tiny change) | ||
| 2 | |||
| 3 | * url-history.el (url-history-track): | ||
| 4 | Call url-history-setup-save-timer in :set function. | ||
| 5 | :type allows three alternatives. | ||
| 6 | (url-history-setup-save-timer): Test url-history-track. | ||
| 7 | * url.el (url-retrieve): Test url-history-track. | ||
| 8 | |||
| 1 | 2005-11-18 Stefan Monnier <monnier@iro.umontreal.ca> | 9 | 2005-11-18 Stefan Monnier <monnier@iro.umontreal.ca> |
| 2 | 10 | ||
| 3 | * url-http.el: Use with-current-buffer. | 11 | * url-http.el: Use with-current-buffer. |
diff --git a/lisp/url/url-history.el b/lisp/url/url-history.el index 6da5dd91551..a847b26cec2 100644 --- a/lisp/url/url-history.el +++ b/lisp/url/url-history.el | |||
| @@ -38,11 +38,17 @@ | |||
| 38 | :group 'url) | 38 | :group 'url) |
| 39 | 39 | ||
| 40 | (defcustom url-history-track nil | 40 | (defcustom url-history-track nil |
| 41 | "*Controls whether to keep a list of all the URLS being visited. | 41 | "*Controls whether to keep a list of all the URLs being visited. |
| 42 | If non-nil, url will keep track of all the URLS visited. | 42 | If non-nil, the URL package will keep track of all the URLs visited. |
| 43 | If set to t, then the list is saved to disk at the end of each Emacs | 43 | If set to t, then the list is saved to disk at the end of each Emacs |
| 44 | session." | 44 | session." |
| 45 | :type 'boolean | 45 | :set #'(lambda (var val) |
| 46 | (set-default var val) | ||
| 47 | (and (bound-and-true-p 'url-setup-done) | ||
| 48 | (url-history-setup-save-timer))) | ||
| 49 | :type '(choice (const :tag "off" nil) | ||
| 50 | (const :tag "on" t) | ||
| 51 | (const :tag "within session" 'session)) | ||
| 46 | :group 'url-history) | 52 | :group 'url-history) |
| 47 | 53 | ||
| 48 | (defcustom url-history-file nil | 54 | (defcustom url-history-file nil |
| @@ -89,7 +95,7 @@ to run the `url-history-setup-save-timer' function manually." | |||
| 89 | (cond ((fboundp 'cancel-timer) (cancel-timer url-history-timer)) | 95 | (cond ((fboundp 'cancel-timer) (cancel-timer url-history-timer)) |
| 90 | ((fboundp 'delete-itimer) (delete-itimer url-history-timer)))) | 96 | ((fboundp 'delete-itimer) (delete-itimer url-history-timer)))) |
| 91 | (setq url-history-timer nil) | 97 | (setq url-history-timer nil) |
| 92 | (if url-history-save-interval | 98 | (if (and (eq url-history-track t) url-history-save-interval) |
| 93 | (setq url-history-timer | 99 | (setq url-history-timer |
| 94 | (cond | 100 | (cond |
| 95 | ((fboundp 'run-at-time) | 101 | ((fboundp 'run-at-time) |