David Kastrup writes: > Richard Stallman writes: > >> Ok, I agree to adding the LOCATION arg. But it needs to be documented. > > Here is the latest patch iteration. I think it should be fit for > checking in. It might also seem reasonable to add the optional > `position' argument to `current-active-maps', but this has not been > done. Here is a patch that would achieve that. After scanning through keymap.c, I believe that this should be the last change required to provide APIs to the keymap access on overlays and display strings, thus making manual simulation of keymap search order for whatever purpose unnecessary. At a cursory glance through callers, I don't see code within Emacs itself which would really require this at the current point of time. I remember some stuff by now implemented with unread-command-events that went through hoops in order to repeat a key lookup with one keymap excluded. This kind of thing would be more reliably achieved by using `current-active-maps' with a position argument, removing the non-needed keymap from the list, and repeating the lookup. While I don't think we should change any of the existing callers right now, it might be a good idea to have this API available in future. The implementation is reasonably simple. I don't think a GCPRO is needed here, but I can't say that I know garbage collection inside out. If there is agreement to put this in in order to complete the accessor functions to mouse-dependent keymaps, I would add this to the manual and NEWS file, too. What do you think?