[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
lisp/usr/url-history bug in cvs head
From: |
James Cloos |
Subject: |
lisp/usr/url-history bug in cvs head |
Date: |
Sun, 20 Feb 2005 03:10:56 -0500 |
User-agent: |
Gnus/5.110003 (No Gnus v0.3) Emacs/22.0.50 (gnu/linux) |
I'm running cvs head updated w/in the last 8 hours.
I've been getting backtraces whenever gnus tries to display an html
mail which tries to dl stuff such as images.
The root cause is is url/url-history.el:
First it has:
|> (defvar url-history-hash-table nil
|> "Hash table for global history completion.")
then, later,
|> (defun url-have-visited-url (url)
|> (url-do-setup)
|> (gethash url url-history-hash-table nil))
whereas the next defun includes this snippet:
|> (defun url-completion-function (string predicate function)
|> (url-do-setup)
|> ;;; ...
|> ((eq function 'lambda)
|> (and url-history-hash-table
|> (gethash string url-history-hash-table)
|> t))
As you can see, url-completion-function confirms that
url-history-hash-table is non-null before calling gethash.
Both functions also call (url-do-setup), so that cannot
be presumed to set url-history-hash-table.
I presume that url-have-visited-url should use (and) as well.
If so, the patch below adds that call.
diff -uNr emacs/lisp/url/url-history.el url-fix/lisp/url/url-history.el
--- a/lisp/url/url-history.el 2004-10-10 16:37:43.000000000 -0400
+++ b/lisp/url/url-history.el 2005-02-20 03:06:19.388079195 -0500
@@ -164,7 +164,8 @@
(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)
-JimC
--
James H. Cloos, Jr. <address@hidden>
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- lisp/usr/url-history bug in cvs head,
James Cloos <=