aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Monnier2004-04-12 04:04:10 +0000
committerStefan Monnier2004-04-12 04:04:10 +0000
commitad8c3ee06789bfc57975cefbfc27139d8f126a1c (patch)
treeaaa45a7342884cacbce6bee0ae7f68fa7ecea4a7
parent88c963ed405e11de34f45b96e177bd728187cf59 (diff)
downloademacs-ad8c3ee06789bfc57975cefbfc27139d8f126a1c.tar.gz
emacs-ad8c3ee06789bfc57975cefbfc27139d8f126a1c.zip
(url-history-setup-save-timer): Avoid warnings.
-rw-r--r--lisp/url/url-history.el78
1 files changed, 40 insertions, 38 deletions
diff --git a/lisp/url/url-history.el b/lisp/url/url-history.el
index 633c22d1887..1d5153ff327 100644
--- a/lisp/url/url-history.el
+++ b/lisp/url/url-history.el
@@ -1,27 +1,30 @@
1;;; url-history.el --- Global history tracking for URL package 1;;; url-history.el --- Global history tracking for URL package
2
3;; Copyright (c) 1996 - 1999,2004 Free Software Foundation, Inc.
4;; Copyright (c) 1993 - 1996 by William M. Perry <wmperry@cs.indiana.edu>
5
2;; Keywords: comm, data, processes, hypermedia 6;; Keywords: comm, data, processes, hypermedia
3 7
4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 8;; This file is part of GNU Emacs.
5;;; Copyright (c) 1993 - 1996 by William M. Perry <wmperry@cs.indiana.edu> 9;;
6;;; Copyright (c) 1996 - 1999 Free Software Foundation, Inc. 10;; GNU Emacs is free software; you can redistribute it and/or modify
7;;; 11;; it under the terms of the GNU General Public License as published by
8;;; This file is part of GNU Emacs. 12;; the Free Software Foundation; either version 2, or (at your option)
9;;; 13;; any later version.
10;;; GNU Emacs is free software; you can redistribute it and/or modify 14;;
11;;; it under the terms of the GNU General Public License as published by 15;; GNU Emacs is distributed in the hope that it will be useful,
12;;; the Free Software Foundation; either version 2, or (at your option) 16;; but WITHOUT ANY WARRANTY; without even the implied warranty of
13;;; any later version. 17;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14;;; 18;; GNU General Public License for more details.
15;;; GNU Emacs is distributed in the hope that it will be useful, 19;;
16;;; but WITHOUT ANY WARRANTY; without even the implied warranty of 20;; You should have received a copy of the GNU General Public License
17;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21;; along with GNU Emacs; see the file COPYING. If not, write to the
18;;; GNU General Public License for more details. 22;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19;;; 23;; Boston, MA 02111-1307, USA.
20;;; You should have received a copy of the GNU General Public License 24
21;;; along with GNU Emacs; see the file COPYING. If not, write to the 25;;; Commentary:
22;;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, 26
23;;; Boston, MA 02111-1307, USA. 27;;; Code:
24;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
25 28
26;; This can get a recursive require. 29;; This can get a recursive require.
27;;(require 'url) 30;;(require 'url)
@@ -77,28 +80,26 @@ to run the `url-history-setup-save-timer' function manually."
77 "Hash table for global history completion.") 80 "Hash table for global history completion.")
78 81
79;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 82;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
83
80;;;###autoload 84;;;###autoload
81(defun url-history-setup-save-timer () 85(defun url-history-setup-save-timer ()
82 "Reset the history list timer." 86 "Reset the history list timer."
83 (interactive) 87 (interactive)
84 (cond 88 (ignore-errors
85 ((featurep 'itimer) 89 (cond ((fboundp 'cancel-timer) (cancel-timer url-history-timer))
86 (ignore-errors (delete-itimer url-history-timer)) 90 ((fboundp 'delete-itimer) (delete-itimer url-history-timer))))
87 (setq url-history-timer nil) 91 (setq url-history-timer nil)
88 (if url-history-save-interval 92 (if url-history-save-interval
89 (setq url-history-timer 93 (setq url-history-timer
90 (start-itimer "url-history-saver" 'url-history-save-history 94 (cond
91 url-history-save-interval 95 ((fboundp 'run-at-time)
92 url-history-save-interval))))
93 ((fboundp 'run-at-time)
94 (ignore-errors (cancel-timer url-history-timer))
95 (setq url-history-timer nil)
96 (if url-history-save-interval
97 (setq url-history-timer
98 (run-at-time url-history-save-interval 96 (run-at-time url-history-save-interval
99 url-history-save-interval 97 url-history-save-interval
100 'url-history-save-history)))) 98 'url-history-save-history))
101 (t nil))) 99 ((fboundp 'start-itimer)
100 (start-itimer "url-history-saver" 'url-history-save-history
101 url-history-save-interval
102 url-history-save-interval))))))
102 103
103;;;###autoload 104;;;###autoload
104(defun url-history-parse-history (&optional fname) 105(defun url-history-parse-history (&optional fname)
@@ -195,4 +196,5 @@ user for what type to save as."
195 196
196(provide 'url-history) 197(provide 'url-history)
197 198
198;;; arch-tag: fbbbaf63-db36-4e88-bc9f-2939aa93afb2 199;; arch-tag: fbbbaf63-db36-4e88-bc9f-2939aa93afb2
200;;; url-history.el ends here