Raymond Toy wrote:
Does it really make sense to print out hash tables like this?
I'm not
very familiar with xemacs hashtables, but what happens if you do
something like
(defvar obj "abc")
(puthash 1 obj myhash)
(puthash 2 obj myhash)
Then the value for both keys 1 and 2 are eq. If you read the printed
representation back in, won't the value for the two keys no longer be
eq?
Yes, that appears to be the case, both for XEmacs and Emacs 23.
(setq newhash (car (read-from-string
(let ((print-readably t)) (prin1-to-string myhash)))))
=> #<hash-table :size 2/29 :data (1 "abc" 2 "abc") 0x1989>
(eq (gethash 1 myhash)
(gethash 2 myhash))
=> t
(eq (gethash 1 newhash)
(gethash 2 newhash))
=> nil
I agree that that's unfortunate. But apparently Gnus doesn't need this
additional level of correctness in the external representation.
mike
_______________________________________________
XEmacs-Beta mailing list
XEmacs-Beta(a)xemacs.org
http://lists.xemacs.org/mailman/listinfo/xemacs-beta