help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How can I contextually override shift selection functions?


From: ndame
Subject: How can I contextually override shift selection functions?
Date: Sun, 4 Aug 2019 20:07:20 +0200 (CEST)

Let's say I want to add an override functionality of a shift
selection function. The shift selection handling is done by
interactive ^ trickery, and it's not obvious how to preempt it.

E.g. if I want to do something in certain contexts with S-down then
I'd say:


(local-set-key (kbd "S-<down>") (lambda ()
                                  (interactive)
                                  (if (my-context)
                                      (do 'something 'else)
                                    
                                    ;; call S-down as usual
                                    (call-interactively 'next-line))))


Only the thing is call-interactively does not work here, that is
it does not extend the selection when I press S-down.

How can I invoke then the original shift selection feature from a
program if I want to invoke the default behavior?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]