]> git.eshelyaron.com Git - emacs.git/commitdiff
Restore the old behavior of `bookmark-write-file'
authorZhengyi Fu <i@fuzy.me>
Thu, 23 Jan 2025 05:35:16 +0000 (13:35 +0800)
committerEshel Yaron <me@eshelyaron.com>
Sat, 25 Jan 2025 17:49:22 +0000 (18:49 +0100)
* lisp/bookmark.el (bookmark-write-file): Use 'pp-28' to avoid
filling the bookmarks.  (Bug#75775)

Copyright-paperwork-exempt: yes
(cherry picked from commit 67903f5909db5c6140eeffebfaf818b4f93625d5)

lisp/bookmark.el

index eaf5b59026dbd7dc2c97b5c786fdf26a67f14839..8e05023ba4660c7d29b2886987b27d1926109d8b 100644 (file)
@@ -1662,7 +1662,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.