0
0
Fork 1
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2024-08-25 03:32:51 +00:00

Merge branch 'maint'

This commit is contained in:
Nicolas Goaziou 2012-02-04 16:38:02 +01:00
commit 2402d7a192

View file

@ -20563,24 +20563,28 @@ beyond the end of the headline."
((not (eq last-command this-command)) (point)) ((not (eq last-command this-command)) (point))
(t refpos))))) (t refpos)))))
((org-at-item-p) ((org-at-item-p)
;; Set special position at first white space character after ;; Being at an item and not looking at an the item means point
;; bullet, and check-box, if any. ;; was previously moved to beginning of a visual line, whiche
(let ((after-bullet ;; doesn't contain the item. Therefore, do nothing special,
(and (looking-at org-list-full-item-re) ;; just stay here.
(let ((box (match-end 3))) (when (looking-at org-list-full-item-re)
(if (not box) (match-end 1) ;; Set special position at first white space character after
(let ((after (char-after box))) ;; bullet, and check-box, if any.
(if (and after (= after ? )) (1+ box) box))))))) (let ((after-bullet
;; Special case: Move point to special position when (let ((box (match-end 3)))
;; currently after it or at beginning of line. (if (not box) (match-end 1)
(if (eq special t) (let ((after (char-after box)))
(when (or (> pos after-bullet) (= (point) pos)) (if (and after (= after ? )) (1+ box) box))))))
(goto-char after-bullet)) ;; Special case: Move point to special position when
;; Reversed case: Move point to special position when ;; currently after it or at beginning of line.
;; point was already at beginning of line and command is (if (eq special t)
;; repeated. (when (or (> pos after-bullet) (= (point) pos))
(when (and (= (point) pos) (eq last-command this-command)) (goto-char after-bullet))
(goto-char after-bullet))))))) ;; Reversed case: Move point to special position when
;; point was already at beginning of line and command is
;; repeated.
(when (and (= (point) pos) (eq last-command this-command))
(goto-char after-bullet))))))))
(org-no-warnings (org-no-warnings
(and (featurep 'xemacs) (setq zmacs-region-stays t))))) (and (featurep 'xemacs) (setq zmacs-region-stays t)))))
@ -20619,7 +20623,10 @@ beyond the end of the headline."
(move-end-of-line 1) (move-end-of-line 1)
(when (overlays-at (1- (point))) (backward-char 1))) (when (overlays-at (1- (point))) (backward-char 1)))
;; At an item: Move before any hidden text. ;; At an item: Move before any hidden text.
(t (call-interactively 'end-of-line))) (t (call-interactively
(cond ((org-bound-and-true-p line-move-visual) 'end-of-visual-line)
((fboundp 'move-end-of-line) 'move-end-of-line)
(t 'end-of-line)))))
(org-no-warnings (org-no-warnings
(and (featurep 'xemacs) (setq zmacs-region-stays t))))) (and (featurep 'xemacs) (setq zmacs-region-stays t)))))