all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Michael Slass <miknrene@drizzle.com>
Subject: Re: choose input method automatically
Date: Wed, 09 Jun 2004 18:31:14 GMT	[thread overview]
Message-ID: <m3zn7cr3bh.fsf@eric.rossnet.com> (raw)
In-Reply-To: 40C72DE5.8080304@yahoo.com

Kevin Rodgers <ihs_4664@yahoo.com> 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	other threads:[~2004-06-09 18:31 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-06-09 14:26 choose input method automatically Simon Strobl
2004-06-09 15:33 ` Kevin Rodgers
2004-06-09 18:31   ` Michael Slass [this message]
2004-06-13 10:46     ` Oliver Scholz
2004-06-14  7:35       ` Simon Strobl

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m3zn7cr3bh.fsf@eric.rossnet.com \
    --to=miknrene@drizzle.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.