[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] w3m-lnum add highlight
- From: Katsumi Yamaoka <yamaoka@xxxxxxx>
- Date: Mon, 27 Dec 2010 09:50:18 +0900
- X-ml-name: emacs-w3m
- X-mail-count: 11472
- References: <b4mpqz1s2fg.fsf@xxxxxxx> <87k4p88gbq.fsf@xxxxxxxxx> <b4meifggiel.fsf@xxxxxxx> <878w5nv8fn.fsf@xxxxxxxxx> <b4m1vbeflye.fsf@xxxxxxx> <20100708.200709.142440111.1BF46D@xxxxxxxxxxx> <b4mwrt689f2.fsf@xxxxxxx> <87d3uxix4z.fsf@xxxxxxxxx> <b4mmxu1chti.fsf@xxxxxxx> <87zkxzbbzz.fsf@xxxxxxxxx> <b4m39vp2mkw.fsf@xxxxxxx> <87hbk3ppib.fsf@xxxxxxxxx> <b4moceak9v3.fsf@xxxxxxx> <87mxtasc90.fsf@xxxxxxxxx> <b4meiemcuja.fsf@xxxxxxx> <87eid76kds.fsf@xxxxxxxxx> <b4mtym2zbv9.fsf@xxxxxxx> <87r5gi9owm.fsf@xxxxxxxxx> <b4mbp7keygd.fsf@xxxxxxx> <87pqsotif0.fsf@xxxxxxxxx>
In [emacs-w3m : No.11469] Andrey Kotlarski wrote:
> I've done another set of changes/enhancements to w3m-lnum.el
[...]
Thanks. I've installed the patch with the following modifications:
* w3m-util.el (w3m-replace-regexps-in-string): Move from w3m-lnum.el;
use w3m-replace-in-string instead of replace-regexp-in-string that is
not available in XEmacs 21.4; make it a Lisp function.
(w3m-string-match-p, w3m-substring-no-properties): New functions.
* w3m-lnum.el (w3m-link-set-numbering): Use w3m-string-match-p instead
of string-match-p that is not available in Emacs 21~22 and XEmacs.
(w3m-read-int-interactive): Use w3m-substring-no-properties instead of
substring-no-properties that is not available in Emacs 21, XEmacs 21.4,
and SXEmacs.
(w3m-linknum-follow): Remove the 5th arg passed to read-string. It is
not available in XEmacs.
BTW, I wondered why the macro `w3m-replace-regexps-in-string',
that calls itself recursively, works. Yes, it works. But I'd
been believing that the `funcall' to a compiled macro causes the
`invalid-function' error:
(defmacro foo () "foo")
(funcall 'foo)
It likely happens when compiling a Lisp code without loading the
macro definition, though I guess the code in question probably
uses another way than `funcall'. (I made it a normal Lisp
function so that it may be easily traced to know how it works.)