Restore the old behavior of `bookmark-write-file'
authorZhengyi Fu <i@fuzy.me>
Thu, 23 Jan 2025 05:35:16 +0000 (13:35 +0800)
committerEli Zaretskii <eliz@gnu.org>
Sat, 25 Jan 2025 13:57:09 +0000 (15:57 +0200)
* lisp/bookmark.el (bookmark-write-file): Use 'pp-28' to avoid
filling the bookmarks.  (Bug#75775)

Copyright-paperwork-exempt: yes

lisp/bookmark.el

index b931a4ed2f54c3ec07948c7e367c648af94620ba..cd59293e0a46a62c37ad094beb57114563febef7 100644 (file)
@@ -1678,7 +1678,8 @@ for a file, defaulting to the file defined by variable
        ;; Rather than a single call to `pp' we make one per bookmark.
        ;; Apparently `pp' has a poor algorithmic complexity, so this
        ;; scales a lot better.  bug#4485.
-       (dolist (i bookmark-alist) (pp i (current-buffer)))
+       (let ((pp-default-function #'pp-28))
+         (dolist (i bookmark-alist) (pp i (current-buffer))))
        (insert ")\n")
        ;; Make sure the specified encoding can safely encode the
        ;; bookmarks.  If it cannot, suggest utf-8-emacs as default.