[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: minibuffer.el completion bug with markers
From: |
Stefan Monnier |
Subject: |
Re: minibuffer.el completion bug with markers |
Date: |
Thu, 03 Oct 2013 22:24:03 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) |
> The recent changes to minibuffer.el broke completion functions when
> they use markers to define where the completed text starts and ends.
Thanks, installed.
Stefan
> (with-temp-buffer
> (cl-flet ((test/completion-at-point ()
> (list (copy-marker (point-min))
> (copy-marker (point))
> 'test/completion-table))
> (test/completion-table (string pred action)
> (if (eq action 'lambda)
> nil
> "test: ")))
> (let ((completion-at-point-functions '(test/completion-at-point)))
> (insert "TEST")
> (completion-at-point)
> (assert (equal (buffer-string)
> "test: ")))))
Thanks for the test, tho it fails. I think you meant to use `flet'
above rather than `cl-flet'. Those are quite different (basically,
`flet' provides dynamically scoped definitions, whereas
`cl-flet' provides lexically scoped definitions).
Stefan
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: minibuffer.el completion bug with markers,
Stefan Monnier <=