emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/emacs-23 r100026: * lisp/url/url-cookie.el


From: Glenn Morris
Subject: [Emacs-diffs] /srv/bzr/emacs/emacs-23 r100026: * lisp/url/url-cookie.el (url-cookie-expired-p): Tweak previous change.
Date: Wed, 08 Sep 2010 22:38:43 -0700
User-agent: Bazaar (2.0.3)

------------------------------------------------------------
revno: 100026
committer: Glenn Morris <address@hidden>
branch nick: emacs-23
timestamp: Wed 2010-09-08 22:38:43 -0700
message:
  * lisp/url/url-cookie.el (url-cookie-expired-p): Tweak previous change.
modified:
  lisp/url/ChangeLog
  lisp/url/url-cookie.el
=== modified file 'lisp/url/ChangeLog'
--- a/lisp/url/ChangeLog        2010-09-09 05:36:13 +0000
+++ b/lisp/url/ChangeLog        2010-09-09 05:38:43 +0000
@@ -1,3 +1,7 @@
+2010-09-09  Glenn Morris  <address@hidden>
+
+       * url-cookie.el (url-cookie-expired-p): Tweak previous change.
+
 2010-09-09  shawn boles  <address@hidden>  (tiny change)
 
        * url-cookie.el (url-cookie-expired-p): Simplify and fix.  (Bug#6957)

=== modified file 'lisp/url/url-cookie.el'
--- a/lisp/url/url-cookie.el    2010-09-09 05:36:13 +0000
+++ b/lisp/url/url-cookie.el    2010-09-09 05:38:43 +0000
@@ -1,7 +1,7 @@
 ;;; url-cookie.el --- Netscape Cookie support
 
-;; Copyright (C) 1996, 1997, 1998, 1999, 2004,
-;;   2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
+;; Copyright (C) 1996, 1997, 1998, 1999, 2004, 2005, 2006, 2007, 2008,
+;;   2009, 2010  Free Software Foundation, Inc.
 
 ;; Keywords: comm, data, processes, hypermedia
 
@@ -193,12 +193,9 @@
        (setq url-cookie-storage (list (list domain tmp))))))))
 
 (defun url-cookie-expired-p (cookie)
-       "Returns true if COOKIE is expired.
-If COOKIE has an expiration date it is converted to seconds, adjusted to the 
client timezone and then compared against (float-time)." 
-       (let* ((exp (url-cookie-expires cookie))
-                                (exp-time (and exp (float-time (date-to-time 
exp)))))
-               (if (not exp) nil       (> (float-time) exp-time)))
-       )
+  "Return non-nil if COOKIE is expired."
+  (let ((exp (url-cookie-expires cookie)))
+    (and exp (> (float-time) (float-time (date-to-time exp))))))
 
 (defun url-cookie-retrieve (host &optional localpart secure)
   "Retrieve all the netscape-style cookies for a specified HOST and LOCALPART."


reply via email to

[Prev in Thread] Current Thread [Next in Thread]