aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSean Allred <code@seanallred.com>2019-01-10 06:51:38 -0600
committerSean Allred <code@seanallred.com>2019-01-13 10:27:53 -0600
commit38ab6e1f1a20f229ec7d7a478dc6ebf5c97823fd (patch)
tree2c5821f2e24c97de2e89b2355f905af6b8e72cb2
parent95100fa3c933f6b00519baa3c7073b882a1b4603 (diff)
Do not modify the answer list when sorting
-rw-r--r--sx-question-print.el2
1 files changed, 1 insertions, 1 deletions
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)