From 6e457cc94c235dd87e25d328c8a306c64cfaa6bd Mon Sep 17 00:00:00 2001 From: Karl Fogel Date: Tue, 28 Dec 2010 22:24:09 -0500 Subject: [PATCH] * 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 . --- lisp/ChangeLog | 6 ++++++ lisp/saveplace.el | 4 +++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index c0ec2bb8ae1..3e9a7d09647 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2010-12-29 Karl Fogel + + * 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 . + 2010-12-28 Chong Yidong * tool-bar.el (tool-bar-setup): Remove :enable conditions, which diff --git a/lisp/saveplace.el b/lisp/saveplace.el index 35625ca276f..eb9ff510fae 100644 --- a/lisp/saveplace.el +++ b/lisp/saveplace.el @@ -213,7 +213,9 @@ may have changed\) back to `save-place-alist'." (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) -- 2.39.5