Merge branch 'maint'

This commit is contained in:
Nicolas Goaziou 2012-11-05 17:40:48 +01:00
commit 854ddf635c

View file

@ -21637,10 +21637,12 @@ tags on the first attempt, and only move to after the tags when
the cursor is already beyond the end of the headline." the cursor is already beyond the end of the headline."
(interactive "P") (interactive "P")
(let ((special (if (consp org-special-ctrl-a/e) (cdr org-special-ctrl-a/e) (let ((special (if (consp org-special-ctrl-a/e) (cdr org-special-ctrl-a/e)
org-special-ctrl-a/e))) org-special-ctrl-a/e))
(if (or (not special) arg) (move-fun (cond ((org-bound-and-true-p visual-line-mode)
(call-interactively 'end-of-visual-line)
(if (fboundp 'move-end-of-line) 'move-end-of-line 'end-of-line)) ((fboundp 'move-end-of-line) 'move-end-of-line)
(t 'end-of-line))))
(if (or (not special) arg) (call-interactively move-fun)
(let* ((element (save-excursion (beginning-of-line) (let* ((element (save-excursion (beginning-of-line)
(org-element-at-point))) (org-element-at-point)))
(type (org-element-type element))) (type (org-element-type element)))
@ -21657,19 +21659,12 @@ the cursor is already beyond the end of the headline."
(not (eq this-command last-command))) (not (eq this-command last-command)))
(goto-char (match-end 0)) (goto-char (match-end 0))
(goto-char (match-beginning 1)))) (goto-char (match-beginning 1))))
(call-interactively (call-interactively move-fun))))
(if (fboundp 'move-end-of-line) 'move-end-of-line ((org-element-property :hiddenp element)
'end-of-line)))))
((memq type
'(center-block comment-block drawer dynamic-block example-block
export-block item plain-list property-drawer
quote-block special-block src-block verse-block))
;; If element is hidden, `move-end-of-line' would put point ;; If element is hidden, `move-end-of-line' would put point
;; after it. Use `end-of-line' to stay on current line. ;; after it. Use `end-of-line' to stay on current line.
(call-interactively 'end-of-line)) (call-interactively 'end-of-line))
(t (t (call-interactively move-fun)))))
(call-interactively
(if (fboundp 'move-end-of-line) 'move-end-of-line 'end-of-line))))))
(org-no-warnings (and (featurep 'xemacs) (setq zmacs-region-stays t))))) (org-no-warnings (and (featurep 'xemacs) (setq zmacs-region-stays t)))))
(define-key org-mode-map "\C-a" 'org-beginning-of-line) (define-key org-mode-map "\C-a" 'org-beginning-of-line)