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

Re: Find/use 'next'/'prev' links not identified within HTML tags (#81)



In [emacs-w3m:13668]
On Mon, 07 Sep 2020 13:41:22 -0700, Boruch Baum wrote:
> An improvement would be to replace the hard-coded regexes with a defcustom
> list of CONS. That way it could support other languages and other pairs of
> keywords.

Thank you for the great feature (if works).  But have you tried
byte-compile it with the git master?  It complained as follows:
,----
| In w3m-scroll-up-or-next-url:
| w3m.el:9141:30: Error: ‘add-to-list’ can’t use lexical var ‘options’; use
|     ‘push’ or ‘cl-pushnew’
| w3m.el:9162:1: Warning: Unused lexical variable ‘cur’
|
| In w3m-scroll-down-or-previous-url:
| w3m.el:9197:30: Error: ‘add-to-list’ can’t use lexical var ‘options’; use
|     ‘push’ or ‘cl-pushnew’
|
| In end of data:
| w3m.el:12087:1: Warning: the function ‘w3m-goto-next-anchor’ is not known to
|     be defined.
`----
Though `add-to-list' currently works as expected even in the
lexbound world as far as I tested, I think we should replace

(while ... (add-to-list (quote VAR) VAL t) ...)

with:

(while ... (cl-pushnew VAL VAR) ...)
(setq VAR (nreverse VAR))

The unused `cur' is in `w3m-scroll-down-or-previous-url'.
The `w3m-goto-next-anchor' function was deleted by me a year ago
in the git master, sorry.

Regards,