unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: slanning@theworld.com
Subject: language environment depending on file
Date: Thu, 14 Oct 2004 14:11:19 +0000 (UTC)	[thread overview]
Message-ID: <ckm1e7$f5d$1@pcls4.std.com> (raw)

I'd like to have emacs change the current language
environment depending on what file I'm editing.
For example, all files ending in .mc, I want to
edit in UTF-8, whereas otherwise use my default
language environment.
  I tried this

  (add-hook 'mmm-mode-hook
    '(lambda ()
       (make-variable-buffer-local 'current-language-environment)
       (set-language-environment "UTF-8")))

in ~/.emacs, to try to set the language environment
only locally to a buffer that's loaded when mmm-mode
is started (so really, it's more than *.mc).
The problem is, it ends up changing the language
environment globally, so after I edit a .mc file,
any other file I edit is edited in UTF-8. So I'd like
a per-mode way of setting the language environment
or something. I guess I could add a similar hook as
above for every other mode, setting language environment
back to what I want for the default, but that seems
pretty ugly.

             reply	other threads:[~2004-10-14 14:11 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-10-14 14:11 slanning [this message]
2004-10-15  9:47 ` language environment depending on file Joakim Hove
2004-10-15 12:38   ` Oliver Scholz
2004-10-19 16:58     ` slanning

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to='ckm1e7$f5d$1@pcls4.std.com' \
    --to=slanning@theworld.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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).