From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: cgorac@yahoo.com (Crni Gorac) Newsgroups: gmane.emacs.help Subject: Re: automating language environment settings Date: 8 Sep 2002 10:42:29 -0700 Organization: http://groups.google.com/ Sender: help-gnu-emacs-admin@gnu.org Message-ID: References: NNTP-Posting-Host: localhost.gmane.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: main.gmane.org 1031507771 5959 127.0.0.1 (8 Sep 2002 17:56:11 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sun, 8 Sep 2002 17:56:11 +0000 (UTC) Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 17o6I6-0001Xz-00 for ; Sun, 08 Sep 2002 19:56:10 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10) id 17o6I4-0004rf-00; Sun, 08 Sep 2002 13:56:08 -0400 Original-Path: shelby.stanford.edu!nntp.stanford.edu!newsfeed.stanford.edu!postnews1.google.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 17 Original-NNTP-Posting-Host: 147.91.66.6 Original-X-Trace: posting.google.com 1031506949 22804 127.0.0.1 (8 Sep 2002 17:42:29 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: 8 Sep 2002 17:42:29 GMT Original-Xref: nntp.stanford.edu gnu.emacs.help:104586 Original-To: help-gnu-emacs@gnu.org Errors-To: help-gnu-emacs-admin@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.help:1143 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:1143 Matthias MEULIEN wrote in message news:... > cgorac@yahoo.com (Crni Gorac) wrote: > > > (...) This is exactly what I have to avoid. I know about all of > > above mentionned but I'd like not to have to type `C-x RET l' > > sequence each time when I open Latin-2 encoded file in order to be > > able to edit it. I'd like to have files let know emacs to change > > language environment to Latin-2 each time when opened. > > The following does what you want ? > > (add-hook 'find-file-hooks > '(lambda () > (if (equal buffer-file-coding-system 'iso-latin-2) > (set-language-environment "Latin-2")))) That was exactly what I was looking for. Thank you very much.