summaryrefslogtreecommitdiff
path: root/lisp/org/org-mouse.el
diff options
context:
space:
mode:
authorBastien Guerry <bzg@gnu.org>2014-10-03 10:13:51 +0200
committerBastien Guerry <bzg@gnu.org>2014-10-03 10:13:51 +0200
commita81e5de3a34d27cea43d49ffdfd9755f0eddb262 (patch)
tree94d0e2b93f054d2cc9f7f7dc5423561ea3c00a2c /lisp/org/org-mouse.el
parente197284d4789d7caa613fc406516f58fbec02547 (diff)
downloademacs-a81e5de3a34d27cea43d49ffdfd9755f0eddb262.tar.gz
emacs-a81e5de3a34d27cea43d49ffdfd9755f0eddb262.tar.bz2
emacs-a81e5de3a34d27cea43d49ffdfd9755f0eddb262.zip
Sync with Org 8.2.8.
Diffstat (limited to 'lisp/org/org-mouse.el')
-rw-r--r--lisp/org/org-mouse.el13
1 files changed, 8 insertions, 5 deletions
diff --git a/lisp/org/org-mouse.el b/lisp/org/org-mouse.el
index 27dc0e070fc..74046c73fe3 100644
--- a/lisp/org/org-mouse.el
+++ b/lisp/org/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