emacs-devel
[Top][All Lists]
Advanced

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

mm-url.el undefines variable url-request-extra-headers


From: Klaus Straubinger
Subject: mm-url.el undefines variable url-request-extra-headers
Date: Tue, 22 Nov 2005 16:47:48 +0100 (CET)

When calling in this sequence

    (require 'mm-url)
    (mm-url-insert-file-contents "http://www.gnu.org/";)
    (url-insert-file-contents "http://www.gnu.org/";)

an error occurs with the message

    Symbol's value as variable is void: url-request-extra-headers


The reason of this is that mm-url-insert-file-contents calls the
function mm-url-load-url which is supposed to load the URL library.
Unfortunately, mm-url-load-url calls only (require 'url-handlers) which
does no longer load any further parts of the URL library at run time.
(require 'url-parse) is only called at compile time. Therefore, the
variable url-request-extra-headers is still not defined when it gets
temporary bound within the function mm-url-insert-file-contents where
calling url-insert-file-contents indirectly causes the calling of
(require 'url-vars). At the end of the temporary binding the variable
is unbound again, leading to the error message given above.

My suggestion is to modify the function mm-url-load-url to really load
the URL library.

-- 
Klaus Straubinger




reply via email to

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