emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Activate an input-method from file-local variables?


From: Kenichi Handa
Subject: Re: Activate an input-method from file-local variables?
Date: Tue, 18 Jul 2006 10:25:41 +0900
User-agent: SEMI/1.14.3 (Ushinoya) FLIM/1.14.2 (Yagi-Nishiguchi) APEL/10.2 Emacs/22.0.50 (i686-pc-linux-gnu) MULE/5.0 (SAKAKI)

In article <address@hidden>, Stefan Monnier <address@hidden> 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
address@hidden





reply via email to

[Prev in Thread] Current Thread [Next in Thread]