Fork me on GitHub

Is it possible to make an elisp function bound to left or right arrow key that: • if no active region, moves the point arg places in arrow direction (standard stuff) • works with shift translation (selects text when shift pressed, standard stuff) • if region is active, deselects text and places the cursor at the start or end of region (depending on arrow direction) The tricky part afaict is shift translation deselects before function runs, and I can't tell if text was selected on last point.


Managed it with advices on handle-shift-selection & call-interactively & such


Could you please share the mapping for curiosity’s sake?