Stop C-a and C-e from deactivating the mark
authorCarsten Dominik <carsten.dominik@gmail.com>
Sun, 8 Sep 2013 16:22:51 +0000 (8 18:22 +0200)
committerCarsten Dominik <carsten.dominik@gmail.com>
Sun, 8 Sep 2013 16:22:51 +0000 (8 18:22 +0200)
* lisp/org.el (org-beginning-of-line):
(org-end-of-line): Bind deactivate-mark to avoid that this command
deactivates it.

lisp/org.el

index 7f0717e..59a22a2 100644 (file)
@@ -22704,7 +22704,7 @@ beyond the end of the headline."
        (special (if (consp org-special-ctrl-a/e)
                     (car org-special-ctrl-a/e)
                   org-special-ctrl-a/e))
-       refpos)
+       deactivate-mark refpos)
     (if (org-bound-and-true-p visual-line-mode)
        (beginning-of-visual-line 1)
       (beginning-of-line 1))
@@ -22772,7 +22772,8 @@ the cursor is already beyond the end of the headline."
        (move-fun (cond ((org-bound-and-true-p visual-line-mode)
                         'end-of-visual-line)
                        ((fboundp 'move-end-of-line) 'move-end-of-line)
-                       (t 'end-of-line))))
+                       (t 'end-of-line)))
+       deactivate-mark)
     (if (or (not special) arg) (call-interactively move-fun)
       (let* ((element (save-excursion (beginning-of-line)
                                      (org-element-at-point)))