[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: choose input method automatically

From: Michael Slass
Subject: Re: choose input method automatically
Date: Tue, 29 Jun 2004 17:36:21 -0000
User-agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux)

Kevin Rodgers <address@hidden> 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

reply via email to

[Prev in Thread] Current Thread [Next in Thread]