Subject: bug#6076: 23.1.96; [PATCH] rcirc-complete for nicks and commands

From: Leo <[email-masked]>
Date: Tue, 04 May 2010 14:41:11 +0100

On 2010-05-02 10:01 +0100, Leo wrote:
> Please review the attached patch instead which fixed compiler warnings
> in the previous patch.
>
> Thanks.
> Leo

This patch make sures commands defined by rcirc are seen first before
server commands.

Leo

diff --git a/lisp/net/rcirc.el b/lisp/net/rcirc.el
index 2e5e7ac..9b58112 100644
--- a/lisp/net/rcirc.el
+++ b/lisp/net/rcirc.el
@@ -800,9 +800,9 @@ IRC command completion is performed only if '/' is the first input char."
              (if (and (zerop rcirc-completion-start-offset)
                       (char-after rcirc-prompt-end-marker)
                       (= (char-after rcirc-prompt-end-marker) ?/))
-                 (sort (delete-dups (append rcirc-client-commands
-                                            (copy-sequence rcirc-server-commands)))
-                       'string-lessp)
+                 (delete-dups
+                  (append (sort (copy-sequence rcirc-client-commands) 'string-lessp)
+                          (sort (copy-sequence rcirc-server-commands) 'string-lessp)))
                (mapcar (lambda (x) (cons x nil))
                        (rcirc-channel-nicks (rcirc-buffer-process)
                                             rcirc-target)))))))