Subject: bug#10546: completion-at-point bug

From: Andreas Röhler <[email-masked]>
Date: Wed, 18 Jan 2012 19:50:56 +0100

Hi,

get wrong error messages like

let*: Wrong type argument: listp, 16

from `completion-at-point' in cases `tab-to-tab-stop'
sends back a number - the column reached.

;;;;;;;;;
bug pertains to Emacs-23 and 24
patch attached

thanks all,

Andreas
--- emacs-23.3.90/lisp/minibuffer.el	2012-01-11 13:35:01.000000000 +0100
+++ minibuffer.el	2012-01-18 18:57:37.561110910 +0100
@@ -1198,15 +1198,16 @@
               'completion-at-point-functions)))
     (cond
      ((functionp res) (funcall res))
-     (res
-      (let* ((plist (nthcdr 3 res))
-             (start (nth 0 res))
-             (end (nth 1 res))
-             (completion-annotate-function
-              (or (plist-get plist :annotation-function)
-                  completion-annotate-function)))
-        (completion-in-region start end (nth 2 res)
-                              (plist-get plist :predicate)))))))
+     (unless (numberp res)
+       (res
+        (let* ((plist (nthcdr 3 res))
+               (start (nth 0 res))
+               (end (nth 1 res))
+               (completion-annotate-function
+                (or (plist-get plist :annotation-function)
+                    completion-annotate-function)))
+          (completion-in-region start end (nth 2 res)
+                                (plist-get plist :predicate))))))))
 
 ;;; Key bindings.