[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: W3M frame-local buffers (w3m-fb.el).
>>>>> Matt Hodges writes:
(B > > Oops, I found your reply just now in the Gmane newsgroup (mails
(B > > sent to me tends to stagnate for these days :-<). Anyway, I seem
(B > > to have fixed the problem.
(B > I don't think this fully fixes it. What if someone does (setq
(B > w3m-fb-mode t) and hasn't set w3m-pop-up-frames?
(B > Maybe something like the attached is needed, perhaps even a warning
(B > for users?
(BSorry, that totally broke things -- not allowing to start a new W3M
(Bsession on a frame that didn't have one already.
(BI propose a different check to disable the feature after a careless
(B(setq w3m-fb-mode t):
--- w3m-util.el 19 Dec 2005 14:05:49 +0000 1.98
(B+++ w3m-util.el 23 Dec 2005 11:11:17 +0000
(B@@ -390,7 +390,8 @@
(B (nreverse rest)
(B (sort rest #'w3m-buffer-name-lessp)))
(B (when (and w3m-fb-mode
(B- (if w3m-pop-up-frames
(B+ (if (or w3m-pop-up-frames
(B+ (not (memq 'w3m-fb-add w3m-mode-hook)))
(B ;; `w3m-fb-mode' might have been set by something
(B ;; other than the `w3m-fb-mode' function.
(B (setq w3m-fb-mode nil)
(B@@ -399,14 +400,10 @@
(B ;; because `buffers' may have been sorted.
(B (let ((fbs (w3m-fb-frame-parameter w3m-fb-list-buffers-frame
(B- ;; Maybe someone did (setq w3m-fb-mode t) in which case the
(B- ;; W3M buffers have not been associated with frames, and the
(B- ;; relevant hooks have not been set up.
(B- (when fbs
(B- (setq rest buffers)
(B- (while rest
(B- (unless (memq (setq buffer (pop rest)) fbs)
(B- (setq buffers (delq buffer buffers)))))))
(B+ (setq rest buffers)
(B+ (while rest
(B+ (unless (memq (setq buffer (pop rest)) fbs)
(B+ (setq buffers (delq buffer buffers))))))