From 38ab6e1f1a20f229ec7d7a478dc6ebf5c97823fd Mon Sep 17 00:00:00 2001 From: Sean Allred Date: Thu, 10 Jan 2019 06:51:38 -0600 Subject: Do not modify the answer list when sorting --- sx-question-print.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sx-question-print.el b/sx-question-print.el index 22226b3..aefddf0 100644 --- a/sx-question-print.el +++ b/sx-question-print.el @@ -244,7 +244,7 @@ QUESTION must be a data structure returned by `json-read'." (mapc #'sx-question-mode--print-section (cl-remove-if #'sx--deleted-p - (cl-sort .answers sx-question-mode-answer-sort-function)))) + (cl-sort (copy-sequence .answers) sx-question-mode-answer-sort-function)))) (insert "\n\n ") (insert-text-button "Write an Answer" :type 'sx-button-answer) (run-hooks 'sx-question-mode-after-print-hook) -- cgit v1.2.3