]> code.delx.au - gnu-emacs/blobdiff - lisp/url/url-cookie.el
Fix bug #19157 with incorrect hscroll during I-search.
[gnu-emacs] / lisp / url / url-cookie.el
index 008203c90df398e9eefe5ffe0d56facd7c187e67..f89886b95dd4a50da775497881cbfff5161ede2b 100644 (file)
@@ -1,6 +1,6 @@
 ;;; url-cookie.el --- URL cookie support
 
-;; Copyright (C) 1996-1999, 2004-2013 Free Software Foundation, Inc.
+;; Copyright (C) 1996-1999, 2004-2014 Free Software Foundation, Inc.
 
 ;; Keywords: comm, data, processes, hypermedia
 
@@ -158,7 +158,9 @@ telling Microsoft that."
   "Return non-nil if COOKIE is expired."
   (let ((exp (url-cookie-expires cookie)))
     (and (> (length exp) 0)
-        (> (float-time) (float-time (date-to-time exp))))))
+        (condition-case ()
+            (> (float-time) (float-time (date-to-time exp)))
+          (error nil)))))
 
 (defun url-cookie-retrieve (host &optional localpart secure)
   "Retrieve all cookies for a specified HOST and LOCALPART."
@@ -352,9 +354,9 @@ to run the `url-cookie-setup-save-timer' function manually."
 ;;; Mode for listing and editing cookies.
 
 (defun url-cookie-list ()
-  "List the URL cookies."
+  "Display a buffer listing the current URL cookies, if there are any.
+Use \\<url-cookie-mode-map>\\\[url-cookie-delete] to remove cookies."
   (interactive)
-
   (when (and (null url-cookie-secure-storage)
             (null url-cookie-storage))
     (error "No cookies are defined"))