diff options
author | Sebastien Delafond <seb@debian.org> | 2014-06-21 11:08:09 +0200 |
---|---|---|
committer | Sébastien Delafond <sdelafond@gmail.com> | 2014-07-13 13:35:35 +0200 |
commit | 0a60a1ae5b73c4569a4bdfdd56a3eeb3fbc0b3dc (patch) | |
tree | 0e277c1c07e8d47b85bbc3c996febb70da50dfde /lisp/org-mouse.el | |
parent | 2d3359e41007641d7a8e5b088d9286aef64d99e7 (diff) | |
parent | 361fd4da7cfa870165cb1ec175cdbea55ca40e7e (diff) |
Imported Debian patch 8.2.7a-1
Diffstat (limited to 'lisp/org-mouse.el')
-rw-r--r-- | lisp/org-mouse.el | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/lisp/org-mouse.el b/lisp/org-mouse.el index 27dc0e0..74046c7 100644 --- a/lisp/org-mouse.el +++ b/lisp/org-mouse.el @@ -953,20 +953,23 @@ This means, between the beginning of line and the point." (point) (save-excursion (goto-char start) (org-back-to-heading) (point)))) - (outline-end-of-subtree) + (progn (org-end-of-subtree nil t) + (unless (eobp) (backward-char))) (end-of-line) (if (eobp) (newline) (forward-char))) (when (looking-at org-outline-regexp) (let ((level (- (match-end 0) (match-beginning 0)))) (when (> end (match-end 0)) - (outline-end-of-subtree) + (progn (org-end-of-subtree nil t) + (unless (eobp) (backward-char))) (end-of-line) (if (eobp) (newline) (forward-char)) (setq level (1+ level))) (org-paste-subtree level) (save-excursion - (outline-end-of-subtree) + (progn (org-end-of-subtree nil t) + (unless (eobp) (backward-char))) (when (bolp) (delete-char -1)))))))))) @@ -1003,8 +1006,8 @@ This means, between the beginning of line and the point." (org-mouse-main-buffer (current-buffer))) (when (eq (with-current-buffer buffer major-mode) 'org-mode) (let ((endmarker (with-current-buffer buffer - (outline-end-of-subtree) - (forward-char 1) + (org-end-of-subtree nil t) + (unless (eobp) (forward-char 1)) (copy-marker (point))))) (org-with-remote-undo buffer (with-current-buffer buffer |