;;; url-history.el --- Global history tracking for URL package
-;; Author: $Author: fx $
-;; Created: $Date: 2001/05/05 16:49:52 $
-;; Version: $Revision: 1.6 $
+
+;; Copyright (C) 1996, 1997, 1998, 1999, 2004,
+;; 2005 Free Software Foundation, Inc.
+
;; Keywords: comm, data, processes, hypermedia
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; Copyright (c) 1993 - 1996 by William M. Perry <wmperry@cs.indiana.edu>
-;;; Copyright (c) 1996 - 1999 Free Software Foundation, Inc.
-;;;
-;;; This file is part of GNU Emacs.
-;;;
-;;; GNU Emacs is free software; you can redistribute it and/or modify
-;;; it under the terms of the GNU General Public License as published by
-;;; the Free Software Foundation; either version 2, or (at your option)
-;;; any later version.
-;;;
-;;; GNU Emacs is distributed in the hope that it will be useful,
-;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-;;; GNU General Public License for more details.
-;;;
-;;; You should have received a copy of the GNU General Public License
-;;; along with GNU Emacs; see the file COPYING. If not, write to the
-;;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-;;; Boston, MA 02111-1307, USA.
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;; This file is part of GNU Emacs.
+;;
+;; GNU Emacs is free software; you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation; either version 2, or (at your option)
+;; any later version.
+;;
+;; GNU Emacs is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;; GNU General Public License for more details.
+;;
+;; You should have received a copy of the GNU General Public License
+;; along with GNU Emacs; see the file COPYING. If not, write to the
+;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
+
+;;; Commentary:
+
+;;; Code:
;; This can get a recursive require.
;;(require 'url)
(autoload 'url-do-setup "url")
(defgroup url-history nil
- "History variables in the URL package"
+ "History variables in the URL package."
:prefix "url-history"
: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.
-If eq to `t', then the list is saved to disk at the end of each emacs
+If set to t, then the list is saved to disk at the end of each Emacs
session."
:type 'boolean
:group 'url-history)
"Hash table for global history completion.")
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
;;;###autoload
(defun url-history-setup-save-timer ()
"Reset the history list timer."
(interactive)
- (cond
- ((featurep 'itimer)
- (ignore-errors (delete-itimer url-history-timer))
- (setq url-history-timer nil)
- (if url-history-save-interval
- (setq url-history-timer
- (start-itimer "url-history-saver" 'url-history-save-history
- url-history-save-interval
- url-history-save-interval))))
- ((fboundp 'run-at-time)
- (ignore-errors (cancel-timer url-history-timer))
- (setq url-history-timer nil)
- (if url-history-save-interval
- (setq url-history-timer
+ (ignore-errors
+ (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
+ (setq url-history-timer
+ (cond
+ ((fboundp 'run-at-time)
(run-at-time url-history-save-interval
url-history-save-interval
- 'url-history-save-history))))
- (t nil)))
+ 'url-history-save-history))
+ ((fboundp 'start-itimer)
+ (start-itimer "url-history-saver" 'url-history-save-history
+ url-history-save-interval
+ url-history-save-interval))))))
;;;###autoload
(defun url-history-parse-history (&optional fname)
(defun url-have-visited-url (url)
(url-do-setup)
- (gethash url url-history-hash-table nil))
+ (and url-history-hash-table
+ (gethash url url-history-hash-table nil)))
(defun url-completion-function (string predicate function)
(url-do-setup)
(gethash string url-history-hash-table)
t))
(t
- (error "url-completion-function very confused."))))
+ (error "url-completion-function very confused"))))
(provide 'url-history)
+
+;; arch-tag: fbbbaf63-db36-4e88-bc9f-2939aa93afb2
+;;; url-history.el ends here