]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp/bookmark.el (bookmark-write-file): Bind `print-circle' to `t'
authorKarl Fogel <kfogel@red-bean.com>
Mon, 1 Oct 2012 03:44:59 +0000 (22:44 -0500)
committerKarl Fogel <kfogel@red-bean.com>
Mon, 1 Oct 2012 03:44:59 +0000 (22:44 -0500)
  here to allow circular custom bookmark types.  (Bug#12503)

lisp/ChangeLog
lisp/bookmark.el

index 7ac0ec729905a57e4612a0da96eb74458d624d5d..0e515c2a7b4e8cd552eb340305a015b75a450625 100644 (file)
@@ -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  <eggert@cs.ucla.edu>
 
index 3259d6283f91ed5fd891571081ea25f7376f41f1..ebb3aac331914250eb74c991f3bfe299994a9225 100644 (file)
@@ -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.