]> git.eshelyaron.com Git - emacs.git/commit
(pp-fill): Cut before parens and dots
authorStefan Monnier <monnier@iro.umontreal.ca>
Fri, 22 Mar 2024 20:46:28 +0000 (16:46 -0400)
committerEshel Yaron <me@eshelyaron.com>
Sun, 24 Mar 2024 14:20:32 +0000 (15:20 +0100)
commit01e4b619c919256a93010a90635812df6086f33f
tree63cdd9fef0297ed216d712946718ba264c676b0e
parent76c8fa47710ab2e6f8c02256adb694133dfaff68
(pp-fill): Cut before parens and dots

The `pp-fill` code sometimes end up generating things like:

    (foo .
         bar)

instead of

    (foo
     .  bar)

so make sure we cut before rather than after the dot (and open
parens while we're at it).

* lisp/emacs-lisp/pp.el (pp-fill): Cut before parens and dots.

* test/lisp/emacs-lisp/pp-tests.el (pp-tests--dimensions): New function.
(pp-tests--cut-before): New test.

(cherry picked from commit 7269a2f1586733bd03b569608bd77112b2e6487f)
lisp/emacs-lisp/pp.el
test/lisp/emacs-lisp/pp-tests.el