]> code.delx.au - gnu-emacs/commitdiff
* lisp/erc/erc-pcomplete.el (erc-pcomplete): Don't use `pcomplete' any more.
authorStefan Monnier <monnier@iro.umontreal.ca>
Fri, 17 Apr 2015 02:55:41 +0000 (22:55 -0400)
committerStefan Monnier <monnier@iro.umontreal.ca>
Fri, 17 Apr 2015 02:55:41 +0000 (22:55 -0400)
lisp/erc/erc-pcomplete.el

index f1e912c3d7c899dfae3535b345db02b66bd59ca6..7f901edfb8fb295cf5c2537389112870f4a02326 100644 (file)
@@ -80,11 +80,11 @@ for use on `completion-at-point-function'."
 
 (defun erc-pcomplete ()
   "Complete the nick before point."
+  (declare (obsolete completion-at-point "25.1"))
   (interactive)
   (when (> (point) (erc-beg-of-input-line))
-    (setq this-command 'pcomplete)
-    (call-interactively 'pcomplete)
-    t))
+    (let ((completion-at-point-functions '(erc-pcompletions-at-point)))
+      (completion-at-point))))
 
 ;;; Setup function
 
@@ -237,7 +237,7 @@ If optional argument IGNORE-SELF is non-nil, don't return the current nick."
   "Returns a list of all nicks on the current server."
   (let (nicks)
     (erc-with-server-buffer
-      (maphash (lambda (nick user)
+      (maphash (lambda (nick _user)
                  (setq nicks (cons (concat nick postfix) nicks)))
                erc-server-users))
       nicks))