Merge branch 'maint'
This commit is contained in:
commit
fa56da61a7
|
@ -23609,7 +23609,9 @@ depending on context."
|
||||||
(skip-chars-forward " \r\t\n"))))
|
(skip-chars-forward " \r\t\n"))))
|
||||||
(narrow-to-region (org-element-property :contents-begin element)
|
(narrow-to-region (org-element-property :contents-begin element)
|
||||||
contents-end))
|
contents-end))
|
||||||
(call-interactively #'forward-sentence))))))
|
;; End of heading is considered as the end of a sentence.
|
||||||
|
(let ((sentence-end (concat (sentence-end) "\\|^\\*+ .*$")))
|
||||||
|
(call-interactively #'forward-sentence)))))))
|
||||||
|
|
||||||
(define-key org-mode-map "\M-a" 'org-backward-sentence)
|
(define-key org-mode-map "\M-a" 'org-backward-sentence)
|
||||||
(define-key org-mode-map "\M-e" 'org-forward-sentence)
|
(define-key org-mode-map "\M-e" 'org-forward-sentence)
|
||||||
|
|
|
@ -3414,8 +3414,8 @@ SCHEDULED: <2017-05-06 Sat>
|
||||||
(org-test-with-temp-text "Paragraph 1.<point>\n\nParagraph 2."
|
(org-test-with-temp-text "Paragraph 1.<point>\n\nParagraph 2."
|
||||||
(org-forward-sentence)
|
(org-forward-sentence)
|
||||||
(eobp)))
|
(eobp)))
|
||||||
;; On a headline, stop at the end of the line, unless point is
|
;; Headlines are considered to be sentences by themselves, even if
|
||||||
;; already there.
|
;; they do not end with a full stop.
|
||||||
(should
|
(should
|
||||||
(equal
|
(equal
|
||||||
"* Headline"
|
"* Headline"
|
||||||
|
@ -3425,7 +3425,11 @@ SCHEDULED: <2017-05-06 Sat>
|
||||||
(should
|
(should
|
||||||
(org-test-with-temp-text "* Headline<point>\nSentence."
|
(org-test-with-temp-text "* Headline<point>\nSentence."
|
||||||
(org-forward-sentence)
|
(org-forward-sentence)
|
||||||
(eobp))))
|
(eobp)))
|
||||||
|
(should
|
||||||
|
(org-test-with-temp-text "Sentence.<point>\n\n* Headline\n\nSentence 2."
|
||||||
|
(org-forward-sentence)
|
||||||
|
(and (org-at-heading-p) (eolp)))))
|
||||||
|
|
||||||
(ert-deftest test-org/backward-sentence ()
|
(ert-deftest test-org/backward-sentence ()
|
||||||
"Test `org-backward-sentence' specifications."
|
"Test `org-backward-sentence' specifications."
|
||||||
|
|
Loading…
Reference in New Issue