How to define a command that works on the selected region in Emacs Lisp?
September 21, 2023
(defun command-on-region (beg end)
"..."
(interactive "r")
(message "beg: %s\nend: %s" beg end)
(deactivate-mark))
(global-set-key (kbd "C-<f1>") #'command-on-region)