From: Stefan Kangas Date: Thu, 27 Jan 2022 08:45:49 +0000 (+0100) Subject: Merge from origin/emacs-28 X-Git-Tag: emacs-29.0.90~2716 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=a8862f313b92ac0fad35c7240ef4da8e52d55c1d;p=emacs.git Merge from origin/emacs-28 c9524819ea Partially revert a fill-region-as-paragraph regression 6075ea0b79 Fix 'make_lispy_position' when there's an image at EOB # Conflicts: # test/lisp/textmodes/fill-tests.el --- a8862f313b92ac0fad35c7240ef4da8e52d55c1d diff --cc test/lisp/textmodes/fill-tests.el index a3265e24451,8b9f144dfff..b730de5a690 --- a/test/lisp/textmodes/fill-tests.el +++ b/test/lisp/textmodes/fill-tests.el @@@ -76,28 -78,27 +78,49 @@@ (buffer-string) "aaa = baaaaaaaa aaaaaaaaaa\n aaaaaaaaaa\n"))))) +(ert-deftest test-fill-end-period () + (should + (equal + (with-temp-buffer + (text-mode) + (auto-fill-mode) + (insert "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eius.") + (self-insert-command 1 ?\s) + (buffer-string)) + "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eius. ")) + (should + (equal + (with-temp-buffer + (text-mode) + (auto-fill-mode) + (insert "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eius.Foo") + (forward-char -3) + (self-insert-command 1 ?\s) + (buffer-string)) + "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do +eius. Foo"))) + + (ert-deftest test-fill-haskell () + (should + (equal + (with-temp-buffer + (asm-mode) + (dolist (line '(" ;; a b c" + " ;; d e f" + " ;; x y z" + " ;; w")) + (insert line "\n")) + (goto-char (point-min)) + (end-of-line) + (setf fill-column 10) + (fill-paragraph nil) + (buffer-string)) + " ;; a b c + ;; d e f + ;; x y z + ;; w + "))) + (provide 'fill-tests) ;;; fill-tests.el ends here