From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Michael Slass Newsgroups: gmane.emacs.help Subject: Re: choose input method automatically Date: Wed, 09 Jun 2004 18:31:14 GMT Organization: Comcast Online Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: References: <13883bbe.0406090626.409ec60e@posting.google.com> <40C72DE5.8080304@yahoo.com> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1088535282 16405 80.91.224.253 (29 Jun 2004 18:54:42 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 29 Jun 2004 18:54:42 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Jun 29 20:54:22 2004 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1BfNkL-00039O-00 for ; Tue, 29 Jun 2004 20:54:21 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1BfNm0-0002b9-Q8 for geh-help-gnu-emacs@m.gmane.org; Tue, 29 Jun 2004 14:56:04 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!wn14feed!worldnet.att.net!attbi_s53.POSTED!53ab2750!not-for-mail Original-Newsgroups: gnu.emacs.help User-Agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux) Cancel-Lock: sha1:Bpt9mmVYrP62XNo3RXCkUsUPQZ0= Original-Lines: 35 Original-NNTP-Posting-Host: 24.18.253.35 Original-X-Complaints-To: abuse@comcast.net Original-X-Trace: attbi_s53 1086805874 24.18.253.35 (Wed, 09 Jun 2004 18:31:14 GMT) Original-NNTP-Posting-Date: Wed, 09 Jun 2004 18:31:14 GMT Original-Xref: shelby.stanford.edu gnu.emacs.help:123720 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.4 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:19087 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:19087 Kevin Rodgers writes: >Simon Strobl wrote: > > if a file starts with > > > > -*- coding: utf-8;-*- > > > > emacs will automatically set the coding to utf-8. Is there something > > analogous for the input method? > >I would try adding this in -*-...-*-: > >eval: (set-input-method "foo") > There's a gotcha with that --- if you don't want emacs forcing you to confirm the local eval each time you read one of these files, you'll need to frob enable-local-eval, as described in the "File Local Variables" section of the emacs manual (excerpted below): ,---- | The `eval' "variable," and certain actual variables, create a | special risk; when you visit someone else's file, local variable | specifications for these could affect your Emacs in arbitrary ways. | Therefore, the option `enable-local-eval' controls whether Emacs | processes `eval' variables, as well variables with names that end in | `-hook', `-hooks', `-function' or `-functions', and certain other | variables. The three possibilities for the option's value are `t', | `nil', and anything else, just as for `enable-local-variables'. The | default is `maybe', which is neither `t' nor `nil', so normally Emacs | does ask for confirmation about file settings for these variables. `---- -- Mike Slass