Merge branch 'maint'
This commit is contained in:
commit
e79b0bd9f3
|
@ -24190,7 +24190,7 @@ item, etc. It also provides some special moves for convenience:
|
|||
- On a table or a property drawer, jump after it.
|
||||
- On a verse or source block, stop after blank lines."
|
||||
(interactive)
|
||||
(when (eobp) (user-error "Cannot move further down"))
|
||||
(unless (eobp)
|
||||
(let* ((deactivate-mark nil)
|
||||
(element (org-element-at-point))
|
||||
(type (org-element-type element))
|
||||
|
@ -24257,7 +24257,7 @@ item, etc. It also provides some special moves for convenience:
|
|||
((> (line-end-position) contents-begin)
|
||||
(end-of-line)
|
||||
(org-forward-paragraph))
|
||||
(t (goto-char contents-begin)))))
|
||||
(t (goto-char contents-begin))))))
|
||||
|
||||
(defun org-backward-paragraph ()
|
||||
"Move backward to start of previous paragraph or equivalent.
|
||||
|
@ -24272,7 +24272,7 @@ convenience:
|
|||
- On a table or a property drawer, move to its beginning.
|
||||
- On a verse or source block, stop before blank lines."
|
||||
(interactive)
|
||||
(when (bobp) (user-error "Cannot move further up"))
|
||||
(unless (bobp)
|
||||
(let* ((deactivate-mark nil)
|
||||
(element (org-element-at-point))
|
||||
(type (org-element-type element))
|
||||
|
@ -24320,7 +24320,7 @@ convenience:
|
|||
(org-backward-paragraph))
|
||||
(t (goto-char (or post-affiliated begin))))
|
||||
;; Ensure we never leave point invisible.
|
||||
(when (org-invisible-p (point)) (beginning-of-visual-line))))
|
||||
(when (org-invisible-p (point)) (beginning-of-visual-line)))))
|
||||
|
||||
(defun org-forward-element ()
|
||||
"Move forward by one element.
|
||||
|
|
|
@ -3361,11 +3361,12 @@ SCHEDULED: <2017-05-06 Sat>
|
|||
|
||||
(ert-deftest test-org/forward-paragraph ()
|
||||
"Test `org-forward-paragraph' specifications."
|
||||
;; At end of buffer, return an error.
|
||||
(should-error
|
||||
;; At end of buffer, do not return an error.
|
||||
(should
|
||||
(org-test-with-temp-text "Paragraph"
|
||||
(goto-char (point-max))
|
||||
(org-forward-paragraph)))
|
||||
(org-forward-paragraph)
|
||||
t))
|
||||
;; Standard test.
|
||||
(should
|
||||
(org-test-with-temp-text "P1\n\nP2\n\nP3"
|
||||
|
@ -3430,10 +3431,11 @@ SCHEDULED: <2017-05-06 Sat>
|
|||
|
||||
(ert-deftest test-org/backward-paragraph ()
|
||||
"Test `org-backward-paragraph' specifications."
|
||||
;; Error at beginning of buffer.
|
||||
(should-error
|
||||
;; Do not error at beginning of buffer.
|
||||
(should
|
||||
(org-test-with-temp-text "Paragraph"
|
||||
(org-backward-paragraph)))
|
||||
(org-backward-paragraph)
|
||||
t))
|
||||
;; Regular test.
|
||||
(should
|
||||
(org-test-with-temp-text "P1\n\nP2\n\nP3"
|
||||
|
|
Loading…
Reference in New Issue