]> git.eshelyaron.com Git - emacs.git/commitdiff
Merge from origin/emacs-28
authorStefan Kangas <stefan@marxist.se>
Thu, 27 Jan 2022 08:45:49 +0000 (09:45 +0100)
committerStefan Kangas <stefan@marxist.se>
Thu, 27 Jan 2022 08:45:49 +0000 (09:45 +0100)
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

1  2 
lisp/textmodes/fill.el
src/xdisp.c
test/lisp/textmodes/fill-tests.el

Simple merge
diff --cc src/xdisp.c
Simple merge
index a3265e2445116bac851947d4a882552b775af356,8b9f144dfff0c3b818c92427491de3cec3e233b5..b730de5a69076d91f94bed09338b2e8c945b93bd
                 (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