[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: recentre anchor at top of window
- From: Katsumi Yamaoka <yamaoka@xxxxxxx>
- Date: Wed, 22 Apr 2009 11:47:58 +0900
- X-ml-name: emacs-w3m
- X-mail-count: 10839
- References: <87vdp2rhef.fsf@xxxxxxxxx> <b4mbpqro832.fsf@xxxxxxx> <8763gyzyac.fsf@xxxxxxxxx>
>>>>> In [emacs-w3m : No.10836] Kevin Ryde wrote:
> Katsumi Yamaoka <yamaoka@xxxxxxx> writes:
>> (To make the advice to `w3m-view-this-url-1' work, evaluating
>> the `w3m-view-this-url' Lisp source is needed since
>> `w3m-view-this-url-1' is an inline function.)
> Ah yes, I forget why that had seemed to work. I think it was meant to
> pick up link following with Ret.
>> (defcustom w3m-view-this-url-and-recenter 1
> Maybe call it `w3m-view-recenter' or something like that, and make it
> apply to all forms of view and goto which have an anchor. The main
> w3m-goto-url was the one I most wanted to work that way (rather than
> anything specific to w3m-view-this-url).
I've implemented it as follows:
w3m-view-recenter is a variable defined in `w3m.el'.
Its value is (t . 1)
Argument passed to `recenter' that runs when visiting a link.
Valid values include an integer, t and nil, and cons of them.
T means run `recenter' with no argument. Nil means don't perform it.
If it is cons, the car is used for an ordinary link, and the cdr is
used for a name link, i.e., the case where the url string ends up with
Now w3m-search-name-anchor, w3m-view-this-url-1, w3m-next-anchor,
w3m-previous-anchor, w3m-next-form, w3m-previous-form,
w3m-next-image, and w3m-previous-image work with it. Suggestions
to improve this feature are welcome.