From: Andreas Gerler Date: Fri, 17 Mar 2017 13:22:47 +0000 (+0100) Subject: xah-copy-line-or-region: slight modification X-Git-Url: http://git.bundesbrandschatzamt.de/?a=commitdiff_plain;h=d96ce7e671628bb0f7b5307734a7e6f25295e602;p=emacsconfig.git xah-copy-line-or-region: slight modification - don't jump to next line if region was active. Signed-off-by: Andreas Gerler --- diff --git a/bba.org b/bba.org index 8cb4726c..4ece8e53 100644 --- a/bba.org +++ b/bba.org @@ -2786,9 +2786,11 @@ Thanks to [[http://ergoemacs.org/emacs/emacs_keybinding_design_beginning-of-line (if current-prefix-arg (message "Buffer text copied") (message "Text copied")))) - (end-of-line) - (forward-char) - )) + (if (not (use-region-p)) + (progn + (end-of-line) + (forward-char)) + ))) (define-key global-map (kbd "M-w") 'xah-copy-line-or-region) #+END_SRC