From ae24d821faba48fbc74ace082ff28669f9e1cec3 Mon Sep 17 00:00:00 2001 From: Kelvin White Date: Sat, 7 Nov 2015 12:54:58 -0500 Subject: [PATCH] erc-pcomplete.el (pcomplete-erc-nicks): Fix bug#18771 --- lisp/erc/ChangeLog.2 | 5 +++++ lisp/erc/erc-pcomplete.el | 7 ++++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/lisp/erc/ChangeLog.2 b/lisp/erc/ChangeLog.2 index 8dce5084ec9..80ee3bbbd09 100644 --- a/lisp/erc/ChangeLog.2 +++ b/lisp/erc/ChangeLog.2 @@ -1,3 +1,8 @@ +2015-11-07 Kelvin White + + * erc-pcomplete.el (pcomplete-erc-nicks): Fix bug for tab complete + (bug#18771) + 2015-03-25 Stefan Monnier * erc.el (erc-switch-to-buffer): Fix last change (bug#20187). diff --git a/lisp/erc/erc-pcomplete.el b/lisp/erc/erc-pcomplete.el index e46ac68b259..686a3a8e1d0 100644 --- a/lisp/erc/erc-pcomplete.el +++ b/lisp/erc/erc-pcomplete.el @@ -225,9 +225,10 @@ If optional argument IGNORE-SELF is non-nil, don't return the current nick." (erc-get-channel-user-list))) (nicks nil)) (dolist (user users) - (unless (and ignore-self - (string= (erc-server-user-nickname (car user)) - (erc-current-nick))) + (unless (or (not user) + (and ignore-self + (string= (erc-server-user-nickname (car user)) + (erc-current-nick)))) (setq nicks (cons (concat (erc-server-user-nickname (car user)) postfix) nicks)))) -- 2.39.5