all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* uppercase->lowercase and function-key-map
@ 2002-05-22  2:11 Stefan Monnier
  2002-05-24  0:44 ` Richard Stallman
  0 siblings, 1 reply; 4+ messages in thread
From: Stefan Monnier @ 2002-05-22  2:11 UTC (permalink / raw)



When ESC O H fails to be found in function-key-map and the `H' is
turned into `h' should `ESC O h' be looked up in function-key-map again ?

My gut feeling says no and a comment in read_key_sequence agrees:

      /* If the sequence is unbound, see if we can hang a function key
	 off the end of it.  We only want to scan real keyboard input
	 for function key sequences, so if mock_input says that we're
	 re-reading old events, don't examine it.  */

but further down in the same function, when we downcase the `H'
the code does:

	  /* We have to do this unconditionally, regardless of whether
	     the lower-case char is defined in the keymaps, because they
	     might get translated through function-key-map.  */
	  keybuf[t - 1] = new_key;
	  mock_input = max (t, mock_input);

	  fkey_map = prev_fkey_map;
	  fkey_start = prev_fkey_start;
	  fkey_end = prev_fkey_end;

	  keytran_map = prev_keytran_map;
	  keytran_start = prev_keytran_start;
	  keytran_end = prev_keytran_end;

	  goto replay_sequence;

where the `fkey_start = prev_fkey_start' implies that we might rescan
the new key sequence for function-key-map bindings (whether and
when this rescan actually happen, I don't really know because the
code is not the clearest ever).

Further more the above few lines come from the following two changes:

revision 1.357
date: 1995/08/08 05:12:31;  author: rms;  state: Exp;  lines: +61 -43
(read_key_sequence): Undo previous change.
Instead, put back the orig_uppercase event if key is not defined.
When downcasing, back up one step in key-translation processing.
----------------------------
revision 1.356
date: 1995/08/03 00:02:07;  author: rms;  state: Exp;  lines: +64 -20
(read_key_sequence): Don't downshift an event
if that fails to make it bound.
(follow_key): Don't alter contents of NEXT until the end.
----------------------------

which seem to indicate that Richard went through some amount of trouble
in order to make sure that the key-translation would be (at least
partly) redone.

Does anybody know why one would want to redo the key-translation ?


	Stefan

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

end of thread, other threads:[~2002-05-25 21:20 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-05-22  2:11 uppercase->lowercase and function-key-map Stefan Monnier
2002-05-24  0:44 ` Richard Stallman
2002-05-24 15:03   ` Stefan Monnier
2002-05-25 21:20     ` Richard Stallman

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.