[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to handle both minor mode and major mode remapping a command?
From: |
Michael Heerdegen |
Subject: |
Re: How to handle both minor mode and major mode remapping a command? |
Date: |
Thu, 19 Dec 2024 20:36:55 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
Ihor Radchenko <yantar92@posteo.net> writes:
> That will, of course, work. However, I feel that it will only solve this
> exact problem, but nothing more.
>
> Just in Org mode, we also need special handling of
> `move-beginning-of-line' and `move-end-of-line' for visual mode (for the
> same reasons). Does it mean that we need to introduce yet more
> "*-function" variables? It will not be scalable.
We would factor out the common part (whose semantic changes) and make
that the thing that `add-function' would modify. A function value that
returns the positions of beginning and end of a line when called,
something like that.
> What I was thinking about is some way for command remapping to:
>
> 1. remap overriding minor modes
> 2. be able to access commands (possible remapped) that are shadowed by
> current remapping
>
> Maybe what I want is advice flexibility for keymaps. (not sure)
What would one be able to do using that imagined mechanism that one
cannot do with `add-function'?
Michael.