From: cgorac@yahoo.com (Crni Gorac)
Subject: Re: automating language environment settings
Date: 5 Sep 2002 07:26:32 -0700 [thread overview]
Message-ID: <cb2002fc.0209050626.395a41bb@posting.google.com> (raw)
In-Reply-To: m2n0qxlgle.fsf@clarinde.localdomain
Matthias Meulien <meulien@club.lemonde.fr> wrote in message news:<m2n0qxlgle.fsf@clarinde.localdomain>...
> > From time to time, I'm using emacs to edit documents written using ISO
> > 8859-2 charset. Thus, I have first to set language environment to
> > "Latin-2", then to open text file and finally to select "latin-2-prefix"
> > as input method.
>
> You can activate the "latin-2-prefix" input method automatically when
> changing of language environment with the following hooks; it also sets
> the default input method for the latin-1 language environment:
>
> (add-hook 'set-language-environment-hook
> '(lambda ()
> (let ((lang current-language-environment))
> (cond ((equal lang "Latin-2")
> (set-terminal-coding-system 'latin-2)
> (activate-input-method "latin-2-prefix"))
> ((equal lang "Latin-1")
> (set-terminal-coding-system 'latin-1)
> (setq default-input-method "french-prefix"))))))
>
> (add-hook 'exit-language-environment-hook
> '(lambda ()
> (set-terminal-coding-system nil)))
>
> Note that the terminal settings are useful when you work on a character terminal.
>
> > So I was thinking about automating above process by creating
> > corresponding emacs mode and then to reference this mode from first
> > line of related documents; if everything setup properly, emacs
> > should be able to apply all necessary settings upon opening
> > document. (...)
>
> Read about local variables in the info manual.
>
> Don't you think that the `C-x RET l' key sequence is enough?
This is exactly what I have to avoid. I know about all of above
mentionned but I'd like not to have to type `C-x RET l' sequence each
time when I open Latin-2 encoded file in order to be able to edit it.
I'd like to have files let know emacs to change language environment
to Latin-2 each time when opened.
Thanks.
next prev parent reply other threads:[~2002-09-05 14:26 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-09-04 13:41 automating language environment settings Crni Gorac
2002-09-04 13:58 ` Peter Wu
2002-09-04 18:09 ` Crni Gorac
2002-09-04 18:43 ` Jesper Harder
2002-09-04 19:06 ` Matthias Meulien
2002-09-05 14:26 ` Crni Gorac [this message]
2002-09-06 14:39 ` Matthias MEULIEN
2002-09-08 17:42 ` Crni Gorac
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=cb2002fc.0209050626.395a41bb@posting.google.com \
--to=cgorac@yahoo.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).