(while
(progn
(funcall avoid-unbreakable)
- (not (zerop (skip-chars-backward " \t({[',.")))))
+ (let ((pos (point)))
+ (skip-chars-backward " \t({[',.")
+ (while (and (memq (char-after) '(?\. ?\{))
+ (not (memq (char-before)
+ '(nil ?\n ?\) \" ?\]))))
+ ;; `.' and `{' within symbols? (Bug#76715)
+ (forward-char 1))
+ (not (eql pos (point))))))
(if (bolp)
;; The sexp already starts on its own line.
(progn (goto-char beg) nil)
(signal (car err) (cdr err))
))))))))
+(ert-deftest pp-tests--bug76715 ()
+ (with-temp-buffer
+ (let ((pp-default-function #'pp-fill)
+ (fill-column 8)
+ (val '(x. y{ z. a{ b. x. y{ z. a{ b.)))
+ (pp val (current-buffer))
+ (goto-char (point-min))
+ (should (equal (read (current-buffer)) val)))))
+
;;; pp-tests.el ends here.