]> git.bundesbrandschatzamt.de Git - emacsconfig.git/commitdiff
xah-copy-line-or-region: slight modification
authorAndreas Gerler <baronNOSPAMbundesbrandschatzamt.de>
Fri, 17 Mar 2017 13:22:47 +0000 (14:22 +0100)
committerAndreas Gerler <baronNOSPAMbundesbrandschatzamt.de>
Fri, 17 Mar 2017 13:22:47 +0000 (14:22 +0100)
- don't jump to next line if region was active.

Signed-off-by: Andreas Gerler <baronNOSPAMbundesbrandschatzamt.de>
bba.org

diff --git a/bba.org b/bba.org
index 8cb4726c50d5562d639fb02e8cc4166373046b21..4ece8e533a7327641144e22edda9c9924b0cfbe2 100644 (file)
--- 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