From a91dedc456aaa355360d29fd95fcc4e55d81b81a Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Thu, 3 Jun 2010 11:51:38 -0400 Subject: [PATCH] * net/rcirc.el (rcirc-sort-nicknames): Change default. (rcirc-sort-nicknames-join): Avoid setq. --- lisp/ChangeLog | 5 +++++ lisp/net/rcirc.el | 10 +++++----- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 05904bef28e..a74c3999b42 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2010-06-03 Stefan Monnier + + * net/rcirc.el (rcirc-sort-nicknames): Change default. + (rcirc-sort-nicknames-join): Avoid setq. + 2010-06-03 Deniz Dogan * net/rcirc.el (rcirc-sort-nicknames): New custom. diff --git a/lisp/net/rcirc.el b/lisp/net/rcirc.el index ba2d3f130c6..0317cac3219 100644 --- a/lisp/net/rcirc.el +++ b/lisp/net/rcirc.el @@ -281,7 +281,8 @@ Called with 5 arguments, PROCESS, SENDER, RESPONSE, TARGET and TEXT." :type 'hook :group 'rcirc) -(defcustom rcirc-sort-nicknames nil +;; Does this really merit a config variable? +(defcustom rcirc-sort-nicknames t "If non-nil, sorts nickname listings." :type 'boolean :group 'rcirc) @@ -1682,10 +1683,9 @@ nicknames sorted. INPUT is a string containing nicknames separated by SEP. This function is non-destructive, sorting a copy of the input." - (let ((parts (split-string input sep t)) - copy) - (setq copy (sort parts 'rcirc-nickname<)) - (mapconcat 'identity copy sep))) + (let* ((parts (split-string input sep t)) + (sorted (sort parts 'rcirc-nickname<))) + (mapconcat 'identity sorted sep))) ;;; activity tracking (defvar rcirc-track-minor-mode-map (make-sparse-keymap) -- 2.39.2