From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: "Stefan Monnier" Newsgroups: gmane.emacs.devel Subject: Re: BUG: which-func-mode Date: Tue, 11 Mar 2003 14:07:35 -0500 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <200303111907.h2BJ7ZHv012258@rum.cs.yale.edu> References: <200303101828.h2AISIrs027316@rum.cs.yale.edu> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1047410299 13810 80.91.224.249 (11 Mar 2003 19:18:19 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Tue, 11 Mar 2003 19:18:19 +0000 (UTC) Cc: Stefan Monnier Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Tue Mar 11 20:18:15 2003 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18spGR-0003aM-00 for ; Tue, 11 Mar 2003 20:18:15 +0100 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 18spdK-000386-00 for ; Tue, 11 Mar 2003 20:41:54 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18spGt-0004Rw-03 for emacs-devel@quimby.gnus.org; Tue, 11 Mar 2003 14:18:43 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13) id 18spCd-0003Q5-00 for emacs-devel@gnu.org; Tue, 11 Mar 2003 14:14:19 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 18sp92-0002eY-00 for emacs-devel@gnu.org; Tue, 11 Mar 2003 14:10:37 -0500 Original-Received: from rum.cs.yale.edu ([128.36.229.169]) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18sp68-0001ds-00; Tue, 11 Mar 2003 14:07:36 -0500 Original-Received: from rum.cs.yale.edu (localhost [127.0.0.1]) by rum.cs.yale.edu (8.12.8/8.12.8) with ESMTP id h2BJ7ZPe012260; Tue, 11 Mar 2003 14:07:35 -0500 Original-Received: (from monnier@localhost) by rum.cs.yale.edu (8.12.8/8.12.8/Submit) id h2BJ7ZHv012258; Tue, 11 Mar 2003 14:07:35 -0500 X-Mailer: exmh version 2.4 06/23/2000 with nmh-1.0.4 Original-To: Richard Stallman Original-cc: lewang@yahoo.com Original-cc: emacs-devel@gnu.org X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Emacs development discussions. List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:12285 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:12285 > > It turned out that `which-func-mode' was using `walk-windows' to update the > > mode-lines in all windows. It selects each window and forces a mode-line > > update in it. But by selecting the window, it silently disrupts the > > `buffer-list'. This is the bug. > > I tried to fix this in one way last fall, by changing select-window > not to alter the frame-selected-window in some cases. That caused > other problems. So in December I undid that change > and tried another fix: > > 2002-12-23 Richard M. Stallman > > * window.el (save-selected-window): Save and restore > selected windows of all frames. > > If this doesn't fix te problem, why doesn't it? In his case, it seems the problem is not that the frame's selected window is changed (which was the problem you're referring to), but that the buffer-list is changed because Fselect_window calls `select_window_1 (window, 1)' where the second arg causes select_window_1 to call `record_buffer (w->buffer)'. Stefan