unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* language environment depending on file
@ 2004-10-14 14:11 slanning
  2004-10-15  9:47 ` Joakim Hove
  0 siblings, 1 reply; 4+ messages in thread
From: slanning @ 2004-10-14 14:11 UTC (permalink / 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.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2004-10-19 16:58 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-10-14 14:11 language environment depending on file slanning
2004-10-15  9:47 ` Joakim Hove
2004-10-15 12:38   ` Oliver Scholz
2004-10-19 16:58     ` slanning

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).