[PATCH] emacs: do not modify the alist passed to notmuch-sort-saved-searches
Jani Nikula
jani at nikula.org
Sun Apr 1 07:51:23 PDT 2012
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.
---
Earlier version by Daniel Schoepe and discussion in thread starting at
id:"1330633478-1974-1-git-send-email-daniel at schoepe.org".
---
emacs/notmuch-hello.el | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/emacs/notmuch-hello.el b/emacs/notmuch-hello.el
index e9caade..8e37761 100644
--- a/emacs/notmuch-hello.el
+++ b/emacs/notmuch-hello.el
@@ -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.
--
1.7.5.4
More information about the notmuch
mailing list