David Kastrup [2022-09-19 23:20:27] wrote: > Stefan Monnier <monn...@iro.umontreal.ca> writes: >> I'm wondering if it would be possible to turn AUCTeX into a minor mode. ]... > Doesn't really seem to fit the conventions for major and minor mode > keybindings.
Not sure what you mean by that. Are you presuming that the `AUCTeX-mode` would place its bindings in the `minor-mode-map-alist`? If so, no, that's not what I'm suggesting. We would clearly want to preserve the current behavior as much as possible, so the `AUCTeX-mode` minor mode would put its keybindings on the "major mode map". Maybe with something like (use-local-map (make-composed-keymap auctex-mode-map (current-local-map))) Most minor modes use `minor-mode-map-alist` for their key-bindings, but there's no rule that imposes this choice. That are also several minor modes which either have no key-bindings, or put theirs in `emulation-mode-map-alists`, or in the global keymap, ... [ I suspect there are also minor modes which do something like what I suggest, tho I must admit that none comes to mind right now. ] Depending on the hurdles we encounter when implementing my suggestion, we might also want to start with a first-cut which only supports *enabling* the minor mode and burps when someone tries to disable it since it doesn't seem like it would be the most important functionality: I'd first and foremost focus on trying to preserve existing behavior instead. What I'm really asking here is if there's a willingness to introduce the inevitable bit of breakage in exchange for a supposed longer term benefit, and/or if someone can think of a better way to move towards a better long-term arrangement than the status quo. Stefan