[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: What tab will be selected after deleting tab (was Re: About Emacs-W3m)
2008/4/7, Katsumi Yamaoka <yamaoka@xxxxxxx>:
> >>>>> In [emacs-w3m : No.10069] Lazycat Manatee wrote:
> > Hi, I'm use Emacs-W3m (Version: 1.5) in Emacs CVS (23.0.60.2)
>
> > This is a litte problem about W3m-Tab use (I use Tabber with Emacs-W3m):
> > I have open three page, it's open sequence is "A", "B", "C", and now i
> > view in "B", when i view over "B", want to close "B"
> > (w3m-delete-buffer),
> > and my behave about view page is Emacs-W3m will force "C", but
> > Emacs-W3m is force "A" (also auto select previous page, not next page
> > that i like).
> > So, how to setup it make Emacs-W3m can auto select next page when
> > current page is closed?
> > Thank you very much! ^_^
>
> Please use either one you like in the ~/.emacs-w3m.el file:
>
> (defadvice w3m-delete-buffer (before next-tab-after-deletion activate)
> "Select the next tab after deletion."
> (when (cdr (memq (current-buffer) (w3m-list-buffers)))
> (w3m-tab-move-right 1)))
>
> (defadvice w3m-delete-buffer (before next-tab-after-deletion activate)
> "Select the next tab after deletion.
> Deleting the rightmost tab goes to the leftmost tab."
> (let ((buffers (w3m-list-buffers)))
> (cond ((cdr (memq (current-buffer) buffers))
> (w3m-tab-move-right 1))
> ((cddr buffers)
> (w3m-tab-move-right (- 2 (length buffers)))))))
>
> I heard that the present behavior has been decided following the
> then Firefox. I've ever made a motion to alter the behavior, and
> saw everyone has his own taste. ;-)
>
> Regards,
>
Thanks! ^_^