unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* How to recognize keyboard insertion?
@ 2009-10-31 15:57 Eli Zaretskii
  2009-10-31 16:58 ` David De La Harpe Golden
  0 siblings, 1 reply; 28+ messages in thread
From: Eli Zaretskii @ 2009-10-31 15:57 UTC (permalink / raw)
  To: emacs-devel

Do we have infrastructure for detecting, inside one of the functions
that insert text into buffers, characters that were inserted via the
keyboard or keyboard macros?

Failing that, can I safely assume that self-insert-command and its
optimized variant in command_loop_1 are the only ways to insert
characters from keyboard and keyboard macros, and that
self-insert-command is only supposed to be invoked by characters typed
at the keyboard?

I'm asking because, in bidirectional editing, characters that are
mirrored at display time need to be mirrored at keyboard input time.
For example, when typing right-to-left text, the character `)' should
be mirrored so that what ends up in the buffer is `(', because what
the user means is to produce an open parenthesis.  (Displaying this
text will then mirror again, and display `)'; this last part already
works in the bidi Emacs I'm working on).

So I need to mirror characters typed at the keyboard, but not
characters yanked from the kill ring or pasted from X selections.  How
can I discern the first kind from the second?

TIA




^ permalink raw reply	[flat|nested] 28+ messages in thread

end of thread, other threads:[~2009-11-02 19:02 UTC | newest]

Thread overview: 28+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-10-31 15:57 How to recognize keyboard insertion? Eli Zaretskii
2009-10-31 16:58 ` David De La Harpe Golden
2009-10-31 17:20   ` Eli Zaretskii
2009-10-31 17:37     ` David De La Harpe Golden
2009-10-31 17:43       ` David De La Harpe Golden
2009-10-31 18:15       ` Eli Zaretskii
2009-10-31 19:26         ` David De La Harpe Golden
2009-10-31 20:01           ` Eli Zaretskii
2009-10-31 20:42             ` David De La Harpe Golden
2009-10-31 21:23               ` Eli Zaretskii
2009-10-31 21:49                 ` David De La Harpe Golden
2009-11-01  3:44                   ` Eli Zaretskii
2009-11-01  5:24                     ` David De La Harpe Golden
2009-11-01 19:59                       ` Eli Zaretskii
2009-11-01 20:19                         ` David De La Harpe Golden
2009-11-01  3:40           ` Stephen J. Turnbull
2009-11-01  5:46             ` David De La Harpe Golden
2009-11-01  5:44         ` tomas
2009-11-01 18:48           ` Eli Zaretskii
2009-11-01 20:09             ` David De La Harpe Golden
2009-11-02  5:03               ` tomas
2009-11-01  1:30     ` Jason Rumney
2009-11-01  4:02       ` Eli Zaretskii
2009-11-01  5:25         ` Stephen J. Turnbull
2009-11-01 13:59           ` David De La Harpe Golden
2009-11-01 19:57           ` Eli Zaretskii
     [not found]     ` <837huac8gg.fsf@gnu.org>
2009-11-02 14:49       ` Ehud Karni
2009-11-02 19:02         ` Eli Zaretskii

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