[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: macros for w3m-attributes
Correction below.
On 2018-08-31 14:56, Boruch Baum wrote:
>
> In the course of trying to debug an issue, I see a series of macros that
> call function `w3m-attributes' and return a subset of that function's
> output. What strikes me as unnecessary is that all of them perform a
> check for a HANDLER argument - but that same identical check is done by
> the underlying function `w3m-attributes' itself!
>
> Am I missing some subtle issue in emacs / emacs-w3m process management?
>
> It seems to me that the macros should all be simplified to the form
>
> `(------ (w3m-attributes ,url ,no-cache))))
`(------ (w3m-attributes ,url ,no-cache ,handler))))
>
> but I hesitate to push a patch because I may be missing something subtle.
>
> Here is a list of the macros in question
>
> w3m-content-type
> w3m-content-charset
> w3m-content-length
> w3m-content-encoding
> w3m-last-modified
> w3m-real-url-1
>
> All are of the form:
>
> (if handler
> `(let ((handler ,handler))
> (w3m-process-do
> (attrs (w3m-attributes ,url ,no-cache handler))
> (car attrs)))
> `(car (w3m-attributes ,url ,no-cache))))
>
> Note that `w3m-process-do' is itself a macro, and that it will create a
> local variable `attrs' bound to the output of `w3m-attributes'.
>
--
hkp://keys.gnupg.net
CA45 09B5 5351 7C11 A9D1 7286 0036 9E45 1595 8BC0