unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#8747: 23.3.50; [PATCH] Fix a bug in url-cookie
@ 2011-05-27 19:46 Leo
  2011-05-29  2:46 ` Leo
  0 siblings, 1 reply; 2+ messages in thread
From: Leo @ 2011-05-27 19:46 UTC (permalink / raw)
  To: 8747

I intend to install the following patch to fix a bug introduced in
revno: 78016 (2007-06-12).

In r78016, :named was not supplied to defstruct which resulted in no
url-cookie-p defined, which in turn lead to no cookies saved to
url-cookie-file. So there is little compatibility to maintain now that 4
years has passed ;)

Leo


diff --git a/lisp/url/url-cookie.el b/lisp/url/url-cookie.el
index 7fdd8b17..78afa163 100644
--- a/lisp/url/url-cookie.el
+++ b/lisp/url/url-cookie.el
@@ -35,17 +35,13 @@ (defgroup url-cookie nil
   :group 'url)
 
 ;; A cookie is stored internally as a vector of 7 slots
-;; [ cookie NAME VALUE EXPIRES LOCALPART DOMAIN SECURE ]
+;; [ url-cookie NAME VALUE EXPIRES LOCALPART DOMAIN SECURE ]
 
 (defstruct (url-cookie
             (:constructor url-cookie-create)
             (:copier nil)
-            ;; For compatibility with a previous version which did not use
-            ;; defstruct, and also in order to make sure that the printed
-            ;; representation does not depend on CL internals, we use an
-            ;; explicitly managed tag.
-            (:type vector))
-  (tag 'cookie :read-only t)
+            (:type vector)
+            :named)
   name value expires localpart domain secure)
 
 (defvar url-cookie-storage nil         "Where cookies are stored.")
@@ -77,8 +73,6 @@ (defun url-cookie-parse-file (&optional fname)
   ;; It's completely normal for the cookies file not to exist yet.
   (load (or fname url-cookie-file) t t))
 
-(declare-function url-cookie-p "url-cookie" t t) ; defstruct
-
 (defun url-cookie-clean-up (&optional secure)
   (let ((var (if secure 'url-cookie-secure-storage 'url-cookie-storage))
 	new new-cookies)





^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-05-29  2:46 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-27 19:46 bug#8747: 23.3.50; [PATCH] Fix a bug in url-cookie Leo
2011-05-29  2:46 ` Leo

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).