Handle correctly `shift-select-mode'

* lisp/org.el (org-beginning-of-line): Handle correctly `shift-select-mode'.

Reported-by: Mathieu Marques <mathieumarques78@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/106783>
This commit is contained in:
Nicolas Goaziou 2016-04-28 23:28:15 +02:00
parent 6ed60a797a
commit 3baf246f4f
1 changed files with 40 additions and 51 deletions

View File

@ -23842,20 +23842,11 @@ beyond the end of the headline."
(car org-special-ctrl-a/e)
org-special-ctrl-a/e))
deactivate-mark refpos)
(if (org-bound-and-true-p visual-line-mode)
(beginning-of-visual-line 1)
(beginning-of-line 1))
(if (and arg (fboundp 'move-beginning-of-line))
(call-interactively 'move-beginning-of-line)
(unless (bobp)
(backward-char 1)
(if (org-truely-invisible-p)
(while (and (not (bobp)) (org-truely-invisible-p))
(backward-char 1)
(beginning-of-line 1))
(forward-char 1))))
(when special
(call-interactively (if (org-bound-and-true-p visual-line-mode)
#'beginning-of-visual-line
#'move-beginning-of-line))
(cond
((or arg (not special)))
((and (looking-at org-complex-heading-regexp)
(eq (char-after (match-end 1)) ?\s))
(setq refpos (min (1+ (or (match-end 3) (match-end 2) (match-end 1)))
@ -23891,8 +23882,6 @@ beyond the end of the headline."
;; repeated.
(when (and (= (point) pos) (eq last-command this-command))
(goto-char after-bullet))))))))
(org-no-warnings
(and (featurep 'xemacs) (setq zmacs-region-stays t))))
(setq disable-point-adjustment
(or (not (invisible-p (point)))
(not (invisible-p (max (point-min) (1- (point))))))))