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

Re: delay with close tab

In [emacs-w3m : No.12177] Jose A. Ortega Ruiz wrote:
> I observe a noticeable delay (sometimes around a second) in refreshing
> the bar right after closing a tab with the command w3m-delete-buffer
> (emacs 24.3.1 and emacs-w3m installed from MELPA).  Up until a month or
> two ago the update used to be instantaneous.

> Something i don't fully understand is why you need to rely on a
> background process to update the tab line in this case: couldn't
> w3m-delete-buffer just trigger an immediate refresh of the tab line right
> after killing the buffer? (it knows for sure that it's been modified).

That would be a good idea.  Does this advice do the trick?

(defadvice w3m-delete-buffer (after update-tab-bar activate)
  "Update tab bar right after deleting a tab."
  (when (eq major-mode 'w3m-mode)
    (setq w3m-tab-timer nil)