From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Piet van Oostrum Newsgroups: gmane.emacs.devel Subject: More problems with flyspell Date: Thu, 05 Jan 2006 14:37:42 +0100 Message-ID: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1136478782 3484 80.91.229.2 (5 Jan 2006 16:33:02 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 5 Jan 2006 16:33:02 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Jan 05 17:33:00 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1EuY2Z-0000EZ-GF for ged-emacs-devel@m.gmane.org; Thu, 05 Jan 2006 17:32:42 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EuXzI-0008BZ-Ci for ged-emacs-devel@m.gmane.org; Thu, 05 Jan 2006 11:29:16 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1EuVN8-00008A-9i for emacs-devel@gnu.org; Thu, 05 Jan 2006 08:41:42 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1EuVN6-00007I-Su for emacs-devel@gnu.org; Thu, 05 Jan 2006 08:41:41 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EuVM3-000814-EQ for emacs-devel@gnu.org; Thu, 05 Jan 2006 08:40:35 -0500 Original-Received: from [131.211.80.10] (helo=mail.cs.uu.nl) by monty-python.gnu.org with esmtp (Exim 4.34) id 1EuVNd-00051e-AV for emacs-devel@gnu.org; Thu, 05 Jan 2006 08:42:13 -0500 Original-Received: from mail.cs.uu.nl (localhost.localdomain [127.0.0.1]) by mail.cs.uu.nl (Postfix) with ESMTP id CFB02A35EB for ; Thu, 5 Jan 2006 14:38:46 +0100 (CET) Original-Received: from ordesa.cs.uu.nl (ordesa.cs.uu.nl [131.211.81.146]) by mail.cs.uu.nl (Postfix) with ESMTP id C4B58A35E5 for ; Thu, 5 Jan 2006 14:38:46 +0100 (CET) Original-Received: by ordesa.cs.uu.nl (Postfix, from userid -2) id D80FB2B3A44; Thu, 5 Jan 2006 14:37:45 +0100 (CET) Original-Received: from ordesa.lan (localhost [127.0.0.1]) by ordesa.cs.uu.nl (Postfix) with ESMTP id E06432B3A13 for ; Thu, 5 Jan 2006 14:37:44 +0100 (CET) X-Mailer: emacs 22.0.50.1 (via feedmail 8 I) Original-To: emacs-devel@gnu.org User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (darwin) X-AV-Checked: ClamAV using ClamSMTP at cs.uu.nl 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:48748 Archived-At: Some recent changes in flyspell.el (flyspell-accept-buffer-local-defs) have caused me a problem. It hit me when I updated my CVS emacs this week: I want my email and news messages to be flyspell-checked automatically, preferably with the right language. So in mail-mode-hook, message-mode-hook and vm-mail-mode-hook I run a function that installs a first-change-hook. In the latter I do some regular expression grepping to guess what language the message is in. This only works when replying to a message, for an new message the default is "Dutch". When I am going to enter a new message in English, I manually run a command to reset it to English. Each time I call (flyspell-mode 1). This used to work, but stopped with the recent version. The reason is the optimization in flyspell-accept-buffer-local-defs. It won't restart ispell because there was no buffer change. So I think when flyspell-accept-buffer-local-defs is called from flyspell-mode-on it should do its work unconditionally. This can be done by setting flyspell-last-buffer to nil in flyspell-mode-on. Or maybe another solution is to give flyspell-accept-buffer-local-defs a parameter that tells whether to do the optimization and only do it in time-critical situations. -- Piet van Oostrum URL: http://www.cs.uu.nl/~piet [PGP 8DAE142BE17999C4] Private email: piet@vanoostrum.org