From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Aidan Kehoe Newsgroups: gmane.emacs.devel Subject: Re: Activate an input-method from file-local variables? Date: Sun, 16 Jul 2006 13:36:11 +0200 Message-ID: <17594.9387.783893.359064@parhasard.net> References: <17593.10.639545.231797@parhasard.net> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: sea.gmane.org 1153049555 31233 80.91.229.2 (16 Jul 2006 11:32:35 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 16 Jul 2006 11:32:35 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Jul 16 13:32:32 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1G24rI-0005Ko-Au for ged-emacs-devel@m.gmane.org; Sun, 16 Jul 2006 13:32:24 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1G24rH-0003JB-0h for ged-emacs-devel@m.gmane.org; Sun, 16 Jul 2006 07:32:23 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1G24r5-0003Ie-4o for emacs-devel@gnu.org; Sun, 16 Jul 2006 07:32:11 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1G24r3-0003IO-Et for emacs-devel@gnu.org; Sun, 16 Jul 2006 07:32:10 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1G24r3-0003IL-BR for emacs-devel@gnu.org; Sun, 16 Jul 2006 07:32:09 -0400 Original-Received: from [66.111.49.30] (helo=icarus.asclepian.ie) by monty-python.gnu.org with esmtp (Exim 4.52) id 1G24tT-0001UY-VB for emacs-devel@gnu.org; Sun, 16 Jul 2006 07:34:40 -0400 Original-Received: by icarus.asclepian.ie (Postfix, from userid 1003) id 11EC18008C; Sun, 16 Jul 2006 12:32:09 +0100 (IST) Original-To: Stefan Monnier In-Reply-To: X-Mailer: VM 7.17 under 21.5 (beta27) "fiddleheads" (+CVS-20060612) XEmacs Lucid X-NS5-file-as-sent: t X-Echelon-distraction: Bosnia Craig Livingstone SDI Saddam Hussein BATF North Korea X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:57087 Archived-At: Ar an c=FAigi=FA l=E1 d=E9ag de m=ED I=FAil, scr=EDobh Stefan Monnier:=20 > 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.=20 (defun hack-activating-input-method () "If `hack-activate-input-method' is bound, activate it as an input meth= od. See the function documentation `activate-input-method' for details on activating input methods. " (when (boundp 'hack-activate-input-method) (activate-input-method hack-activate-input-method))) (add-hook 'find-file-hooks 'hack-activating-input-method) --=20 Santa Maradona, priez pour moi!