emacs: do not modify the alist passed to notmuch-sort-saved-searches

Sort modifies its input as a side effect. Pass it a copy in
notmuch-sort-saved-searches to not modify the notmuch-saved-searches
alist.
This commit is contained in:
Jani Nikula 2012-04-01 17:51:23 +03:00 committed by David Bremner
parent 6acd61dad9
commit 052000f85a

View file

@ -41,7 +41,7 @@
(defun notmuch-sort-saved-searches (alist)
"Generate an alphabetically sorted saved searches alist."
(sort alist (lambda (a b) (string< (car a) (car b)))))
(sort (copy-sequence alist) (lambda (a b) (string< (car a) (car b)))))
(defcustom notmuch-saved-search-sort-function nil
"Function used to sort the saved searches for the notmuch-hello view.