all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / 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

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.