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

Re: macros for w3m-attributes



>> On Mon, 03 Sep 2018 07:28:48 +0900
>> yamaoka@xxxxxxx (Katsumi Yamaoka) said as follows:

>Hi Tsuchiya-san, could you follow this subject up? (I'm not so versed
>in the asynchronous operation of emacs-w3m, sorry.)

I also do not catch Boruch's point.

First of all, I need to talk an old history.

w3m-content-type(), w3m-content-charset() and these macros were defined
as independent inline functions in early emacs-w3m code.  However, these
inline functions shared many redundant codes, thus I determined to
introduce w3m-attributes() to remove redundant codes.  Please note that
these inline functions were already used in numerous places when I wrote
w3m-attributes().  I had two choices:

(1) I could rewrite all occurences of these inline functions with
w3m-attributes(), and

(2) I could write wrapper macros using w3m-attributes() and did not
touch real occurences of these inline functions.

Of course, I selected the latter choice as you see in the current
emacs-w3m code.

Asynchronous operation code such as w3m-process-do() was introduced a
half year after I wrote w3m-attributes().  And then, I converted many
synchronous codes to asynchronous codes mechanically.

Therefore, I think there are several redundant codes as the result of
the wrapper macros and the mechanical conversions.

However, these parts are quite fragile parts of emacs-w3m.  I need much
time to evalute Boruch's patch.

-- 
TSUCHIYA Masatoshi