changeset 112028:5a30dfc28ea8

* lisp/saveplace.el (save-place-alist-to-file): Save list sorted and pretty-printed, so that it is mergeable by line-based text merging, as suggested by Iain Dalton <iain.dalton {_AT_} gmail.com>.
author Karl Fogel <kfogel@red-bean.com>
date Tue, 28 Dec 2010 22:24:09 -0500
parents a23f5102654d
children 921609a7c55a
files lisp/ChangeLog lisp/saveplace.el
diffstat 2 files changed, 9 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Tue Dec 28 14:57:15 2010 -0500
+++ b/lisp/ChangeLog	Tue Dec 28 22:24:09 2010 -0500
@@ -1,3 +1,9 @@
+2010-12-29  Karl Fogel  <kfogel@red-bean.com>
+
+	* saveplace.el (save-place-alist-to-file): Save list sorted and
+	pretty-printed, so that it is mergeable by line-based text merging,
+	as suggested by Iain Dalton <iain.dalton {_AT_} gmail.com>.
+
 2010-12-28  Chong Yidong  <cyd@stupidchicken.com>
 
 	* tool-bar.el (tool-bar-setup): Remove :enable conditions, which
--- a/lisp/saveplace.el	Tue Dec 28 14:57:15 2010 -0500
+++ b/lisp/saveplace.el	Tue Dec 28 22:24:09 2010 -0500
@@ -213,7 +213,9 @@
                       (symbol-name coding-system-for-write)))
       (let ((print-length nil)
             (print-level nil))
-        (print save-place-alist (current-buffer)))
+        (pp (sort save-place-alist
+                  (lambda (a b) (string< (car a) (car b))))
+            (current-buffer)))
       (let ((version-control
              (cond
               ((null save-place-version-control) nil)