[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#10546: completion-at-point bug

From: Andreas Röhler
Subject: bug#10546: completion-at-point bug
Date: Sun, 22 Jan 2012 15:10:18 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; de; rv: Gecko/20111101 SUSE/3.1.16 Thunderbird/3.1.16

Am 18.01.2012 22:22, schrieb Stefan Monnier:
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.

Can you give us the context: what did you do in order for
completion-at-point to call tab-to-tab-stop?


Hi Stefan,

bug seen from forms in python-mode.el

when `py-completion-at-point' doesn't see a completion,
the feature is to insert a TAB then.

In result a number is returned by `tab-to-tab-stop',
which seems to confuse `completion-at-point', sending
the wrong error message.

(defun py-completion-at-point ()
  (interactive "*")
  (let* ((start (when (skip-chars-backward "[[:alnum:]_]")(point)))
         (end (progn (skip-chars-forward "[[:alnum:]_]")(point)))
         (completion (when start
(python-symbol-completions (buffer-substring-no-properties start end)))))
    (if completion
          (delete-region start end)
          (insert (car completion)))


`py-completion-at-point' is called by a var `py-complete-function', whilst `python-mode' runs

  (add-hook 'completion-at-point-functions
            py-complete-function nil 'local)

So far,

thanks developing our tool-of-pleasure :)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]