From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: storm@cua.dk (Kim F. Storm) Newsgroups: gmane.emacs.devel Subject: Re: flyspell bug Date: Mon, 03 Oct 2005 18:14:24 +0200 Message-ID: References: <20051002220548.22F6.SLAWOMIR.NOWACZYK.847@student.lu.se> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1128356435 8876 80.91.229.2 (3 Oct 2005 16:20:35 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 3 Oct 2005 16:20:35 +0000 (UTC) Cc: slawomir.nowaczyk.847@student.lu.se, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Oct 03 18:20:27 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1EMT0r-000164-H2 for ged-emacs-devel@m.gmane.org; Mon, 03 Oct 2005 18:18:03 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EMT0q-0002vO-Nd for ged-emacs-devel@m.gmane.org; Mon, 03 Oct 2005 12:18:00 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1EMSzK-0002KZ-0O for emacs-devel@gnu.org; Mon, 03 Oct 2005 12:16:26 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1EMSzG-0002IX-JI for emacs-devel@gnu.org; Mon, 03 Oct 2005 12:16:25 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EMSzF-0002GF-Tf for emacs-devel@gnu.org; Mon, 03 Oct 2005 12:16:22 -0400 Original-Received: from [195.41.46.237] (helo=pfepc.post.tele.dk) by monty-python.gnu.org with esmtp (Exim 4.34) id 1EMSxX-0006lW-1u; Mon, 03 Oct 2005 12:14:35 -0400 Original-Received: from kfs-l.imdomain.dk.cua.dk (0x503e2644.bynxx3.adsl-dhcp.tele.dk [80.62.38.68]) by pfepc.post.tele.dk (Postfix) with SMTP id 822B926281A; Mon, 3 Oct 2005 18:14:28 +0200 (CEST) Original-To: rms@gnu.org In-Reply-To: (Richard M. Stallman's message of "Mon, 03 Oct 2005 11:34:45 -0400") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:43501 Archived-At: "Richard M. Stallman" writes: > I often wondered why there are no hooks associated with switching > buffers, windows, and frames. > > These activities are too low level. Certainly in the past it was not > safe to run Lisp code for switching buffers, and maybe not for windows > either. Nowadays, since Lisp code can run during redisplay, maybe > it would be safe. But I do not like the idea. Do you really want > set-buffer to run Lisp code you don't know about? I was not suggesting to do this at the low-level. Rather I would do it in the top-level command loop, e.g. by saving the current window/buffer/frame before running the pre-command hook and compare them to the value after running the post-command-hook -- and run the appropriate hooks at that time. That way, e.g. set-buffer on its own won't run any unknown Lisp code. -- Kim F. Storm http://www.cua.dk