AFAIK... You can't arbitrarily prevent key sequences from being bound in keymaps, because you can't control how or when that happens. You can't control when it happens because that time might be "before you started (or even installed) Emacs". Keymaps are sometimes generated at byte-compilation time, and thus even if you were to take the extreme measure of preventing define-key from doing anything at all, you will still acquire populated keymaps when certain libraries are loaded (although if the libraries were byte-compiled while the neutralised define-key was in place, you would then typically be loading empty keymaps; but you would need to recompile everything to get to that point; and of course most installations of Emacs will include pre-compiled .elc files). Native compilation might preclude even that, as IIRC it compiles everything asynchronously in isolation, so the intended clobbering of define-key might not actually be in effect when the native code was being generated. You would then have to edit the core code to enforce your override irrespective of whether your custom code was loaded. You can't control how it happens because libraries can set bindings without using define-key. In the simplest case `use-local-map' for one of the aforementioned pre-generated keymaps may easily occur; but also a keymap is, after all, just a list, so it can be manipulated in any number of ways. (In practice I think that messing with define-key and recompiling All Of The Things would affect almost all keymaps; but in general there's no guarantee.) I would suggest that your best option is to instead ensure that the key lookup sequence always finds your preferred bindings. Despite your concerns about that approach, it seems more viable to me.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4