From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: pre-command-hook with input methods Date: Mon, 09 Feb 2015 09:41:35 -0500 Message-ID: References: <878ugcmqr6.fsf@newcastle.ac.uk> <87fvajb0vs.fsf@newcastle.ac.uk> <87siej9h8c.fsf@newcastle.ac.uk> <87iofb2wfk.fsf@newcastle.ac.uk> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1423492921 10986 80.91.229.3 (9 Feb 2015 14:42:01 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 9 Feb 2015 14:42:01 +0000 (UTC) Cc: emacs-devel@gnu.org To: phillip.lord@newcastle.ac.uk (Phillip Lord) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Feb 09 15:42:00 2015 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1YKpXC-0005en-IT for ged-emacs-devel@m.gmane.org; Mon, 09 Feb 2015 15:41:58 +0100 Original-Received: from localhost ([::1]:33236 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YKpXC-0003Ka-1g for ged-emacs-devel@m.gmane.org; Mon, 09 Feb 2015 09:41:58 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51419) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YKpWx-0003KH-Hk for emacs-devel@gnu.org; Mon, 09 Feb 2015 09:41:44 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YKpWs-00074v-Hv for emacs-devel@gnu.org; Mon, 09 Feb 2015 09:41:43 -0500 Original-Received: from chene.dit.umontreal.ca ([132.204.246.20]:35589) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YKpWs-00071C-DN for emacs-devel@gnu.org; Mon, 09 Feb 2015 09:41:38 -0500 Original-Received: from pastel.home (lechon.iro.umontreal.ca [132.204.27.242]) by chene.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id t19EfaLQ008844; Mon, 9 Feb 2015 09:41:36 -0500 Original-Received: by pastel.home (Postfix, from userid 20848) id DB3641240; Mon, 9 Feb 2015 09:41:35 -0500 (EST) In-Reply-To: <87iofb2wfk.fsf@newcastle.ac.uk> (Phillip Lord's message of "Mon, 09 Feb 2015 10:47:43 +0000") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV5212=0 X-NAI-Spam-Version: 2.3.0.9393 : core <5212> : inlines <2053> : streams <1387395> : uri <1850524> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 132.204.246.20 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:182692 Archived-At: >> The Right Way to fix this is to change the default value to be non-nil. >> In this case, I think using #'list might work. > I am not sure how that would work. Surely the point of having this as a > variable is that it can be changed? I'm only suggesting to change the default value from nil to `list', which I just did in "master". This then allows you to use `add-function' on that variable. But I still think there's room for improvement with something like a `pre-interaction-hook' or something like that. Brings me to the next question. We know you'd like such a pre-interaction-hook to be run just before processing the first char in a multi-char input-method element, but what about the simpler/common case of a key prefix: When the user hits C-x C-f, would you like to run this pre-interaction-hook right when the user hits C-x, or only after the user hit C-x C-f? Maybe what you're after is just an input-event-hook? Stefan