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

Re: W3M frame-local buffers (w3m-fb.el).

>>>>> Katsumi Yamaoka writes:

 > > I will test the code, and have a look at this problem.

 > Oops, I found your reply just now in the Gmane newsgroup (mails
 > sent to me tends to stagnate for these days :-<).  Anyway, I seem
 > to have fixed the problem.

I don't think this fully fixes it.  What if someone does (setq
w3m-fb-mode t) and hasn't set w3m-pop-up-frames?

Maybe something like the attached is needed, perhaps even a warning
for users?


Index: w3m-util.el
RCS file: /storage/cvsroot/emacs-w3m/w3m-util.el,v
retrieving revision 1.97
diff -u -r1.97 w3m-util.el
--- w3m-util.el	19 Dec 2005 10:51:35 -0000	1.97
+++ w3m-util.el	19 Dec 2005 11:02:37 -0000
@@ -399,10 +399,14 @@
       ;; because `buffers' may have been sorted.
       (let ((fbs (w3m-fb-frame-parameter w3m-fb-list-buffers-frame
-	(setq rest buffers)
-	(while rest
-	  (unless (memq (setq buffer (pop rest)) fbs)
-	    (setq buffers (delq buffer buffers))))))
+        ;; Maybe someone did (setq w3m-fb-mode t) in which case the
+        ;; W3M buffers have not been associated with frames, and the
+        ;; relevant hooks have not been set up.
+        (when fbs
+          (setq rest buffers)
+          (while rest
+            (unless (memq (setq buffer (pop rest)) fbs)
+              (setq buffers (delq buffer buffers)))))))