]> code.delx.au - gnu-emacs/blobdiff - lisp/erc/erc-pcomplete.el
Update copyright year to 2014 by running admin/update-copyright.
[gnu-emacs] / lisp / erc / erc-pcomplete.el
index d6bb8019b15b8a434e41188b78293b116cf68a7f..5b7314598047cdd193cd6db065f2d44926726430 100644 (file)
@@ -1,6 +1,6 @@
 ;;; erc-pcomplete.el --- Provides programmable completion for ERC
 
-;; Copyright (C) 2002-2004, 2006-2012 Free Software Foundation, Inc.
+;; Copyright (C) 2002-2004, 2006-2014 Free Software Foundation, Inc.
 
 ;; Author: Sacha Chua <sacha@free.net.ph>
 ;; Maintainer: FSF
@@ -82,10 +82,8 @@ for use on `completion-at-point-function'."
   "Complete the nick before point."
   (interactive)
   (when (> (point) (erc-beg-of-input-line))
-    (let ((last-command (if (eq last-command 'erc-complete-word)
-                            'pcomplete
-                          last-command)))
-      (call-interactively 'pcomplete))
+    (setq this-command 'pcomplete)
+    (call-interactively 'pcomplete)
     t))
 
 ;;; Setup function