From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Agustin Martin Newsgroups: gmane.emacs.devel Subject: Re: Ispell loads dict twice. Date: Wed, 26 Apr 2006 12:14:18 +0200 Message-ID: <20060426101418.GA5899@agmartin.aq.upm.es> References: <87k69eyddj.fsf@lrde.org> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="BOKacYhQ+x31HxR3" X-Trace: sea.gmane.org 1146046573 15150 80.91.229.2 (26 Apr 2006 10:16:13 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 26 Apr 2006 10:16:13 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Apr 26 12:16:09 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 1FYh41-0001aX-Ty for ged-emacs-devel@m.gmane.org; Wed, 26 Apr 2006 12:16:06 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FYh41-0001DE-Iu for ged-emacs-devel@m.gmane.org; Wed, 26 Apr 2006 06:16:05 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FYh3r-0001BR-LZ for emacs-devel@gnu.org; Wed, 26 Apr 2006 06:15:55 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FYh3o-0001AX-Ro for emacs-devel@gnu.org; Wed, 26 Apr 2006 06:15:55 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FYh3o-0001AU-OW for emacs-devel@gnu.org; Wed, 26 Apr 2006 06:15:52 -0400 Original-Received: from [138.100.4.49] (helo=edison.ccupm.upm.es) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1FYh6T-00007S-FD for emacs-devel@gnu.org; Wed, 26 Apr 2006 06:18:37 -0400 Original-Received: from mala.aq.upm.es (Agmartin.aq.upm.es [138.100.41.131]) by edison.ccupm.upm.es (8.13.6/8.13.6) with ESMTP id k3QAEItt011070; Wed, 26 Apr 2006 12:14:18 +0200 Original-Received: by mala.aq.upm.es (Postfix, from userid 1000) id 57BB510E55; Wed, 26 Apr 2006 12:14:18 +0200 (CEST) Original-To: emacs-devel@gnu.org Mail-Followup-To: emacs-devel@gnu.org Content-Disposition: inline In-Reply-To: <87k69eyddj.fsf@lrde.org> User-Agent: Mutt/1.5.11+cvs20060403 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:53457 Archived-At: --BOKacYhQ+x31HxR3 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable X-MIME-Autoconverted: from 8bit to quoted-printable by edison.ccupm.upm.es id k3QAEItt011070 On Mon, Apr 24, 2006 at 09:36:40PM +0200, Micha=EBl Cadilhac wrote: > $ emacs -Q >=20 > C-u M-x ispell-change-dictionary RET francais RET > C-x b test1 RET > M-x ispell-change-dictionary RET english RET > M-x ispell-buffer > C-x b test2 RET > M-x ispell-change-dictionary RET english RET >=20 > The =AB english =BB dictionary will be loaded twice: on the > =AB ispell-buffer =BB and on the latest =AB ispell-change-dictionary = =BB. While the above problem looks rather minor your patch seems to work well here, both the above and the personal dict part. I would only suggest a very minor cosmetic change, as in attached patch (to be applied on top of your patch), just to help people reading the code to understand how that call works without looking at=20 `ispell-buffer-local-dict' definition. If this is used along with your patch, no specific changelog entry is needed, otherwise something like (ispell-change-dictionary) Make (ispell-buffer-local-dict) call more verbose might suffice --=20 Agustin --BOKacYhQ+x31HxR3 Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="ispell.el.double_call+pdict+changes.diff" --- ispell.el.0 2006-04-25 12:20:28.000000000 +0200 +++ ispell.el 2006-04-25 12:29:49.000000000 +0200 @@ -2577,7 +2577,7 @@ (mapcar 'list (ispell-valid-dictionary-list))) nil t) current-prefix-arg)) - (unless arg (ispell-buffer-local-dict t)) + (unless arg (ispell-buffer-local-dict 'no-reload)) (if (equal dict "default") (setq dict nil)) ;; This relies on completing-read's bug of returning "" for no match (cond ((equal dict "") --BOKacYhQ+x31HxR3 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Emacs-devel mailing list Emacs-devel@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-devel --BOKacYhQ+x31HxR3--