Commit 44ea155d authored by Chong Yidong's avatar Chong Yidong
Browse files

* net/rcirc.el (rcirc-nickname<, rcirc-sort-nicknames-join): Doc fix.

parent a91dedc4
2010-06-03 Chong Yidong <cyd@stupidchicken.com>
* net/rcirc.el (rcirc-nickname<, rcirc-sort-nicknames-join): Doc
fix.
2010-06-03 Stefan Monnier <monnier@iro.umontreal.ca> 2010-06-03 Stefan Monnier <monnier@iro.umontreal.ca>
   
* net/rcirc.el (rcirc-sort-nicknames): Change default. * net/rcirc.el (rcirc-sort-nicknames): Change default.
......
...@@ -1657,13 +1657,10 @@ if NICK is also on `rcirc-ignore-list-automatic'." ...@@ -1657,13 +1657,10 @@ if NICK is also on `rcirc-ignore-list-automatic'."
(delete nick rcirc-ignore-list)))) (delete nick rcirc-ignore-list))))
(defun rcirc-nickname< (s1 s2) (defun rcirc-nickname< (s1 s2)
"Compares two IRC nicknames. Operator nicknames (@) are "Return t if IRC nickname S1 is less than S2, and nil otherwise.
considered less than voiced nicknames (+). Any other nicknames Operator nicknames (@) are considered less than voiced
are greater than voiced nicknames. nicknames (+). Any other nicknames are greater than voiced
nicknames. The comparison is case-insensitive."
Returns t if S1 is less than S2, otherwise nil.
The comparison is case-insensitive."
(setq s1 (downcase s1) (setq s1 (downcase s1)
s2 (downcase s2)) s2 (downcase s2))
(let* ((s1-op (eq ?@ (string-to-char s1))) (let* ((s1-op (eq ?@ (string-to-char s1)))
...@@ -1677,12 +1674,9 @@ The comparison is case-insensitive." ...@@ -1677,12 +1674,9 @@ The comparison is case-insensitive."
(string< s1 s2))))) (string< s1 s2)))))
(defun rcirc-sort-nicknames-join (input sep) (defun rcirc-sort-nicknames-join (input sep)
"Takes a string of nicknames and returns the string with the "Return a string of sorted nicknames.
nicknames sorted.
INPUT is a string containing nicknames separated by SEP. INPUT is a string containing nicknames separated by SEP.
This function does not alter the INPUT string."
This function is non-destructive, sorting a copy of the input."
(let* ((parts (split-string input sep t)) (let* ((parts (split-string input sep t))
(sorted (sort parts 'rcirc-nickname<))) (sorted (sort parts 'rcirc-nickname<)))
(mapconcat 'identity sorted sep))) (mapconcat 'identity sorted sep)))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment