Ihor Radchenko <yanta...@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.