From: Karl Fogel Date: Mon, 1 Oct 2012 03:44:59 +0000 (-0500) Subject: * lisp/bookmark.el (bookmark-write-file): Bind `print-circle' to `t' X-Git-Tag: emacs-24.2.90~241^2~73 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=e4c4abdd81a0c58df8b00de73076994b33ee377d;p=emacs.git * lisp/bookmark.el (bookmark-write-file): Bind `print-circle' to `t' here to allow circular custom bookmark types. (Bug#12503) --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 7ac0ec72990..0e515c2a7b4 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -2,6 +2,8 @@ * bookmark.el (bookmark-version-control): Give tags in the :type choices (Bug#12309), and improve doc string. + (bookmark-write-file): Bind `print-circle' to `t' to allow + circular custom bookmark types. (Bug#12503) 2012-10-01 Paul Eggert diff --git a/lisp/bookmark.el b/lisp/bookmark.el index 3259d6283f9..ebb3aac3319 100644 --- a/lisp/bookmark.el +++ b/lisp/bookmark.el @@ -1359,7 +1359,12 @@ for a file, defaulting to the file defined by variable (goto-char (point-min)) (delete-region (point-min) (point-max)) (let ((print-length nil) - (print-level nil)) + (print-level nil) + ;; See bug #12503 for why we bind `print-circle'. Users + ;; can define their own bookmark types, which can result in + ;; arbitrary Lisp objects being stored in bookmark records, + ;; and some users create objects containing circularities. + (print-circle t)) (bookmark-insert-file-format-version-stamp) (insert "(") ;; Rather than a single call to `pp' we make one per bookmark.