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

Re: display-hook



Hi,

>>>>> In [emacs-w3m : No.04809]
>>>>>	JD Smith <jdsmith@as.arizona.edu> wrote:

> I'm attempting to customize emacs-w3m (1.3.3) to display named
> anchors near the top of the window, instead of in the middle when
> they are linked.  Here's what I've used:

> (add-hook 'w3m-display-hook
> 	  (lambda (url)
> 	    (if (not (bobp)) (recenter 1))) 'append)

The reason why your hook doesn't work is the `w3m-goto-url'
function is enclosed with `save-window-excursion' in the
`w3m-view-this-url-1' function.  Since using `s-w-e' is for
keeping windows arangement, not for keeping point or mark,
there should be a solution.  Does anyone have any idea?

You developers can reproduce that behavior as follows:

1. Eval JD's add-hook form.
2. Visit the url http://www.xemacs.org/Lists/index.html.
3. Type RET on the ``xemacs-beta-ja'' button.

Then you may not see the entry to the xemacs-beta-ja list.

**Japanese**
w3m-view-this-url-1 で w3m-goto-url を呼ぶときに
save-window-excursion が被っているので、w3m-display-hook に
(recenter 1) をしかけても効かないという話しです (よね?)。