From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Jochen Schmitt Newsgroups: gmane.emacs.bugs Subject: bug#13460: Issue to change dictionary when using hunspell on emacs Date: Mon, 21 Jan 2013 10:43:40 +0100 Message-ID: <20130121094338.GC1809@omega.in.herr-schmitt.de> References: <20130116122509.GA2209@omega.in.herr-schmitt.de> <83hamh80ry.fsf@gnu.org> <20130117131733.GA20519@omega.in.herr-schmitt.de> <20728.16566.19238.480349@gnu.org> <20130117193029.GB4933@agmartin.aq.upm.es> <20130118170501.GA9786@agmartin.aq.upm.es> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="hOcCNbCCxyk/YU74" X-Trace: ger.gmane.org 1358761446 14375 80.91.229.3 (21 Jan 2013 09:44:06 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 21 Jan 2013 09:44:06 +0000 (UTC) To: 13460@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Jan 21 10:44:23 2013 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1TxDvS-0007a7-33 for geb-bug-gnu-emacs@m.gmane.org; Mon, 21 Jan 2013 10:44:22 +0100 Original-Received: from localhost ([::1]:39465 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TxDvB-0003A7-5j for geb-bug-gnu-emacs@m.gmane.org; Mon, 21 Jan 2013 04:44:05 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:35307) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TxDv7-000391-FH for bug-gnu-emacs@gnu.org; Mon, 21 Jan 2013 04:44:03 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TxDv6-0002hU-3T for bug-gnu-emacs@gnu.org; Mon, 21 Jan 2013 04:44:01 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:36861) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TxDv5-0002hK-WE for bug-gnu-emacs@gnu.org; Mon, 21 Jan 2013 04:44:00 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1TxDw6-0005aX-8P for bug-gnu-emacs@gnu.org; Mon, 21 Jan 2013 04:45:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Jochen Schmitt Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 21 Jan 2013 09:45:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 13460 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 13460-submit@debbugs.gnu.org id=B13460.135876149521454 (code B ref 13460); Mon, 21 Jan 2013 09:45:02 +0000 Original-Received: (at 13460) by debbugs.gnu.org; 21 Jan 2013 09:44:55 +0000 Original-Received: from localhost ([127.0.0.1]:42325 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TxDvz-0005Zy-7T for submit@debbugs.gnu.org; Mon, 21 Jan 2013 04:44:55 -0500 Original-Received: from moutng.kundenserver.de ([212.227.126.187]:53594) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TxDvw-0005Zo-N3 for 13460@debbugs.gnu.org; Mon, 21 Jan 2013 04:44:53 -0500 Original-Received: from omega.in.herr-schmitt.de (p549AEE61.dip.t-dialin.net [84.154.238.97]) by mrelayeu.kundenserver.de (node=mreu3) with ESMTP (Nemesis) id 0MZbAH-1Tc6X317LZ-00LGNo; Mon, 21 Jan 2013 10:43:48 +0100 Original-Received: from omega.in.herr-schmitt.de (localhost [127.0.0.1]) by omega.in.herr-schmitt.de (8.14.6/8.14.5) with ESMTP id r0L9hgHn001897 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO) for <13460@debbugs.gnu.org>; Mon, 21 Jan 2013 10:43:42 +0100 Original-Received: (from s4504kr@localhost) by omega.in.herr-schmitt.de (8.14.6/8.14.5/Submit) id r0L9heV8001896 for 13460@debbugs.gnu.org; Mon, 21 Jan 2013 10:43:40 +0100 Content-Disposition: inline In-Reply-To: <20130118170501.GA9786@agmartin.aq.upm.es> User-Agent: Mutt/1.5.21 (2010-09-15) X-Provags-ID: V02:K0:Rc0LwlR4wF0zyHv7qvyaZxQO0wVeuf2IEHHLoxSEmY8 /7fCqSVfN3IDmM+KKn8uxkzioI9P0ug/OzG64zZg6HlFDSiGsD SwAlwAqmyyVFVVZstusyxo9ksiAUGZb0ELkFHayGTL61miROen pbnQNAghTJQlNNudNl4GEijadnKZ8vtb/lacyX4HkZWJozt0XU gQE967ikTeDPkpUqdyurGOUdj04+lz+ujO6jCC8NB1k/VlqGPu zKt0uJ+BB8C7BHkSViptlyF+h2bdrB3TNfp7gGHrKlPZ4aFugi XJFyWRISnzrwBGD5sRTmvWVSSLQmyfhe+ePwuJaGrgAea1mW/e YhGEwJPbYwqGWqlv4i4fIzNJWgpG8E0BTseyy5WPshsuEi9RxT u9bW8HKCKvI8Q== X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:70129 Archived-At: --hOcCNbCCxyk/YU74 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Fri, Jan 18, 2013 at 06:05:01PM +0100, Agustin Martin wrote: > I have been playing with this. Please see attached patch for current status. > There are a couple of minor things I would like to think about first. > > Current changes explicitly set "english" to one of the two main choices > ("en_GB"). This is not something I like very much and I am aware that > people is sensitive about this. I'd prefer to associate it with plain "en", > but hunspell has some pending issues regarding fallback values. > > Since there should be mapppings for all (but nil) default dict definitions, > and this is only done for those dicts I am also considering to show an error > if an expected mappping is not found, but this is a really minor internal > issue just to help finding missing mappings early. > > I will test these changes a bit more and if no problems appear will commit > early next week. Feedback is welcome. I have add a monor change to your suggested patch to generate an error message, if a language doesn't exist in ispell-hunspell-equivs-alist. My tests show, that this parch works as expected. I have attached the modified version of the patch on this mail. Best Regards: Jochen Schmitt --hOcCNbCCxyk/YU74 Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="emacs-24.2-hunspell.patch" diff -up emacs-24.2/lisp/textmodes/ispell.el.hunspell emacs-24.2/lisp/textmodes/ispell.el --- emacs-24.2/lisp/textmodes/ispell.el.hunspell 2013-01-19 12:38:21.365802034 +0100 +++ emacs-24.2/lisp/textmodes/ispell.el 2013-01-19 14:32:10.527026717 +0100 @@ -572,6 +572,40 @@ re-start Emacs." (coding-system :tag "Coding System"))) :group 'ispell) +(defvar ispell-hunspell-dictionary-equivs-alist + '(("american" "en_US") + ("brasileiro" "pt_BR") + ("british" "en_GB") + ("castellano" "es_ES") + ("castellano8" "es_ES") + ("czech" "cs_CZ") + ("dansk" "da_DK") + ("deutsch" "de_DE") + ("deutsch8" "de_DE") + ("english" "en_GB,en_US") + ("esperanto" "eo") + ("esperanto-tex" "eo") + ("finnish" "fi_FI") + ("francais7" "fr_FR") + ("francais" "fr_FR") + ("francais-tex" "fr_FR") + ("german" "de_DE") + ("german8" "de_DE") + ("italiano" "it_IT") + ("nederlands" "nl_NL") + ("nederlands8" "nl_NL") + ("norsk" "nn_NO") + ("norsk7-tex" "nn_NO") + ("polish" "pl_PL") + ("portugues" "pt_PT") + ("russian" "ru_RU") + ("russianw" "ru_RU") + ("slovak" "sk_SK") + ("slovenian" "sl_SI") + ("svenska" "sv_SE") + ("hebrew" "he_IL")) + "Alist with matching hunspell dict names for standard dict names in + `ispell-dictionary-base-alist'.") (defvar ispell-dictionary-base-alist '((nil @@ -1077,9 +1111,15 @@ time, before `ispell-dictionary-alist' i sysadmins to override entries in `ispell-dictionary-base-alist' by putting those overrides in `ispell-base-dicts-override-alist', which is a dynamically scoped var with same format as `ispell-dictionary-alist'. -This alist will not override the auto-detected values (e.g. if a recent +This alist will no<<<<<<<<<<<<