From: Stefan Monnier <monnier@iro.umontreal.ca>
To: phillip.lord@russet.org.uk (Phillip Lord)
Cc: emacs-devel@gnu.org
Subject: Re: Timing of input-method output
Date: Tue, 26 Mar 2019 11:12:22 -0400 [thread overview]
Message-ID: <jwva7hh3c7q.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <87va06bp7c.fsf@russet.org.uk> (Phillip Lord's message of "Mon, 25 Mar 2019 21:48:23 +0000")
> I've done a bit more work on this and come up with a much simpler
> solution which is specificially plumbed into quail. It looks like this:
>
> modified lisp/international/quail.el
> @@ -59,6 +59,10 @@ quail
> "Quail: multilingual input method."
> :group 'leim)
>
> +
> +(defvar quail-pre-translation-hook nil
> + "Normal hook run before quail starts or updates a translation.")
> +
> ;; Buffer local variables
>
> (defvar quail-current-package nil
> @@ -1548,6 +1552,7 @@ quail-update-translation
> `quail-current-key'. If CONTROL-FLAG is nil, proceed the translation
> with more keys."
> (let ((func (quail-update-translation-function)))
> + (run-hooks 'quail-pre-translation-hook)
> (if func
> (setq control-flag (funcall func control-flag))
> (cond ((numberp control-flag)
This looks pretty good, but I'd like to better understand why this
works well. I.e. how did you end up putting it there rather than elsewhere?
> pre-command-hook is current run by "safe_run_hooks". Does
> `quail-pre-translation-hook' need to be as well (in which case, it would
> need uncovering in lisp)? I guess the counter here is that it's possible
> to get out so long as you don't type certain characters, or you change
> buffer. But, it leaves emacs fairly unusuable none the less.
IIUC C-\ should get you out, so I don't think it's necessary to take any
extra caution here.
> And, where do you think I should document it? Perhaps "Invoking the
> Input Method";
That's probably the best place.
Stefan
next prev parent reply other threads:[~2019-03-26 15:12 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20190122214637.25164.20429@vcs0.savannah.gnu.org>
[not found] ` <20190122214639.B2E13203DD@vcs0.savannah.gnu.org>
2019-01-22 23:17 ` master 7b31de4: Add hook for all events Michael Albinus
2019-01-23 22:56 ` Phillip Lord
2019-01-24 3:36 ` Eli Zaretskii
2019-01-23 1:30 ` [Emacs-diffs] " Daniel Colascione
2019-01-23 23:10 ` Phillip Lord
2019-01-24 2:06 ` Stefan Monnier
2019-01-24 10:41 ` Phillip Lord
2019-01-25 13:56 ` Stefan Monnier
2019-01-28 9:42 ` Phillip Lord
2019-01-26 0:50 ` Stefan Monnier
2019-01-28 9:54 ` Phillip Lord
2019-02-02 16:13 ` Timing of input-method output (was: [Emacs-diffs] master 7b31de4: Add hook for all events) Stefan Monnier
2019-02-03 22:06 ` Timing of input-method output Phillip Lord
2019-02-05 14:49 ` Stefan Monnier
2019-02-06 22:18 ` Phillip Lord
2019-02-06 22:55 ` Stefan Monnier
2019-02-11 22:10 ` Phillip Lord
2019-02-11 22:20 ` Stefan Monnier
2019-02-12 12:21 ` Phillip Lord
2019-03-25 21:48 ` Phillip Lord
2019-03-26 15:12 ` Stefan Monnier [this message]
2019-03-28 13:54 ` Phillip Lord
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=jwva7hh3c7q.fsf-monnier+emacs@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=emacs-devel@gnu.org \
--cc=phillip.lord@russet.org.uk \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.