From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Kevin Rodgers Newsgroups: gmane.emacs.help Subject: Re: set dictionary for a file Date: Wed, 12 Oct 2005 12:38:08 -0600 Message-ID: References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1129142684 18062 80.91.229.2 (12 Oct 2005 18:44:44 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 12 Oct 2005 18:44:44 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Oct 12 20:44:35 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1EPlYl-0004BC-08 for geh-help-gnu-emacs@m.gmane.org; Wed, 12 Oct 2005 20:42:39 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EPlYk-0004MJ-GP for geh-help-gnu-emacs@m.gmane.org; Wed, 12 Oct 2005 14:42:38 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1EPlYX-0004MB-Li for help-gnu-emacs@gnu.org; Wed, 12 Oct 2005 14:42:25 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1EPlYW-0004Ly-2U for help-gnu-emacs@gnu.org; Wed, 12 Oct 2005 14:42:25 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EPlYV-0004Lv-UR for help-gnu-emacs@gnu.org; Wed, 12 Oct 2005 14:42:23 -0400 Original-Received: from [80.91.229.2] (helo=ciao.gmane.org) by monty-python.gnu.org with esmtp (TLS-1.0:RSA_AES_128_CBC_SHA:16) (Exim 4.34) id 1EPlYV-0003Z1-P2 for help-gnu-emacs@gnu.org; Wed, 12 Oct 2005 14:42:24 -0400 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1EPlWW-0003TT-9j for help-gnu-emacs@gnu.org; Wed, 12 Oct 2005 20:40:20 +0200 Original-Received: from 207.167.42.60 ([207.167.42.60]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 12 Oct 2005 20:40:20 +0200 Original-Received: from ihs_4664 by 207.167.42.60 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 12 Oct 2005 20:40:20 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-To: help-gnu-emacs@gnu.org Original-Lines: 76 Original-X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: 207.167.42.60 User-Agent: Mozilla Thunderbird 0.9 (X11/20041105) X-Accept-Language: en-us, en In-Reply-To: X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:30179 Archived-At: Fabian Braennstroem wrote: > I would like to set/change dictionary for certain files, > which I would declare in .emacs. I tried the > ispell-multi.el, but it somehow didn't work for me. In my > Gnus I had > > (add-hook 'gnus-select-group-hook > (lambda () > (cond > ((string-match > "^de\\." (gnus-group-real-name gnus-newsgroup-name)) > (ispell-change-dictionary "deutsch8")) > > which worked a while ago. Here's what ispell.el itself says: ;; Buffer-Local features: ;; There are a number of buffer-local features that can be used to customize ;; ispell for the current buffer. This includes language dictionaries, ;; personal dictionaries, parsing, and local word spellings. Each of these ;; local customizations are done either through local variables, or by ;; including the keyword and argument(s) at the end of the buffer (usually ;; prefixed by the comment characters). See the end of this file for ;; examples. The local keywords and variables are: ;; ispell-dictionary-keyword language-dictionary ;; uses local variable ispell-local-dictionary ;; ispell-pdict-keyword personal-dictionary ;; uses local variable ispell-local-pdict ;; ispell-parsing-keyword mode-arg extended-char-arg ;; ispell-words-keyword any number of local word spellings And: ,----[ C-h v ispell-local-dictionary RET ] | ispell-local-dictionary's value is nil | | Documentation: | If non-nil, the dictionary to be used for Ispell commands. | The value must be a string dictionary name in `ispell-dictionary-alist'. | This variable becomes buffer-local when set in any fashion. | | Setting `ispell-local-dictionary' to a value has the same effect as | calling M-x ispell-change-dictionary with that value. This variable | is automatically set when defined in the file with either | `ispell-dictionary-keyword' or the Local Variable syntax. | | To create a non-standard default dictionary (not from `ispell-dictionary-alist') | call function `set-default' with the new dictionary name. | | You can customize this variable. | | Defined in `ispell'. `---- So try (setq ispell-local-dictionary "deutsch8") in your hook. > Does something similar (file-load-hook?) exist for ordinary files? ,----[ C-h v find-file-hooks RET ] | find-file-hooks's value is | (vc-find-file-hook) | | | Documentation: | List of functions to be called after a buffer is loaded from a file. | The buffer's local variables (if any) will have been processed before the | functions are called. | | Defined in `files'. `---- -- Kevin Rodgers