bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#9751: 23.3; Alternative Keyboard Feature/Bug


From: Stefan Monnier
Subject: bug#9751: 23.3; Alternative Keyboard Feature/Bug
Date: Mon, 24 Oct 2011 09:01:33 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.90 (gnu/linux)

> typing `β' in Info has no effect, it doesn't call `beginning-of-buffer'.
> When typing in Info `C-h k β', it says:
>   β is undefined

Ah, thanks, now I see.
So the issue is the following one:
1- keymaps provide a way to hide bindings in parent keymaps (by using an
   explicit nil binding), but not to hide a binding in subsequent maps
   (e.g. a local map can't hide a binding in the global map).
2- for the main keymaps used to bind keys to commands, we can work around
   this limitation by binding the key to the command `undefined'.
3- but function-key-map doesn't know about this convention, so
   `undefined' is not recognized as "not bound".

I think it would be good to fix (1), but there are very few keymaps that
are both "special in that the bindings are not commands" and have
a "subsequent keymap" at the same time.  Also even if we fix (1), we'd
have to update all the code using `undefined' to use the new special
value (unless we choose `undefined' for that new value, of course).

So I think that fixing (3) is the best choice for now.
Does the patch below work for you?


        Stefan


=== modified file 'src/keyboard.c'
--- src/keyboard.c      2011-10-03 20:50:54 +0000
+++ src/keyboard.c      2011-10-24 13:00:50 +0000
@@ -9852,7 +9852,9 @@
            }
        }
 
-      if (first_binding < nmaps && NILP (submaps[first_binding])
+      if (first_binding < nmaps
+         && NILP (submaps[first_binding])
+         && !EQ (defs[first_binding], Qundefined)
          && indec.start >= t)
        /* There is a binding and it's not a prefix.
           (and it doesn't have any input-decode-map translation pending).






reply via email to

[Prev in Thread] Current Thread [Next in Thread]