unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Kenichi Handa <handa@m17n.org>
Cc: kehoea@parhasard.net, emacs-devel@gnu.org
Subject: Re: Activate an input-method from file-local variables?
Date: Tue, 18 Jul 2006 10:25:41 +0900	[thread overview]
Message-ID: <E1G2eLF-0001Uq-00@etlken> (raw)
In-Reply-To: <jwvmzb9pw8q.fsf-monnier+emacs@gnu.org> (message from Stefan Monnier on Sun, 16 Jul 2006 08:32:45 -0400)

In article <jwvmzb9pw8q.fsf-monnier+emacs@gnu.org>, Stefan Monnier <monnier@iro.umontreal.ca> writes:

>>> AFAICT this does not do what I want: it doesn't *activate* the
>>> input method.  You still need to hit C-\ to activate it.

>> Ah, excuse my misunderstanding. Looking through the source of
>> activate-input-method, as well as setting current-input-method, it calls
>> input-method-specific initialisation code, so simply setting a file-local
>> variable would seem to be impossible. You could, of course, add something
>> like the below to your init file, and specify hack-activate-input-method
>> appropriately in the files you want it to work for. 

> That seems much more complex than my current solution of using
> `eval: (activate-input-method "TeX")' and adding
> (put 'activate-input-method 'safe-local-eval-function t).

Provided that a local variable specified in a file is
customizable, does :set function of it called?

If so, I think the most natural solution is to change
  (defvar current-input-method ...)
to
  (defcustom current-input-method ...)
and provide a proper :set function (perhaps one that calls
activate-input-method).  Then a user can have this in his
file:
  
;; Local Variables:
;; current-input-method: "INPUT_METHOD_NAME"
;; End:

---
Kenichi Handa
handa@m17n.org

  reply	other threads:[~2006-07-18  1:25 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-07-15 14:38 Activate an input-method from file-local variables? Stefan Monnier
2006-07-15 14:47 ` Aidan Kehoe
2006-07-15 14:55   ` David Kastrup
2006-07-15 16:55     ` Aidan Kehoe
2006-07-16  6:25       ` Richard Stallman
2006-07-16 11:59         ` Aidan Kehoe
2006-07-17  1:41           ` Richard Stallman
2006-07-17  7:29             ` Aidan Kehoe
2006-07-18  0:12               ` Richard Stallman
2006-07-15 21:57   ` Stefan Monnier
2006-07-16 11:36     ` Aidan Kehoe
2006-07-16 12:32       ` Stefan Monnier
2006-07-18  1:25         ` Kenichi Handa [this message]
2006-07-18 14:44           ` Stefan Monnier
2006-07-19  0:45             ` Kenichi Handa
2006-07-18 14:59           ` Richard Stallman

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=E1G2eLF-0001Uq-00@etlken \
    --to=handa@m17n.org \
    --cc=emacs-devel@gnu.org \
    --cc=kehoea@parhasard.net \
    /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 public inbox

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

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