GNU bug report logs -
#1797
23.0.60; completing-read breaks backwards compatibility
Previous Next
Reported by: Ulrich Mueller <ulm <at> gentoo.org>
Date: Tue, 6 Jan 2009 00:00:02 UTC
Severity: normal
Done: Chong Yidong <cyd <at> stupidchicken.com>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
>>>>> On Mon, 05 Jan 2009, Stefan Monnier wrote:
>> Also, the different behaviour of `completing-read' breaks backwards
>> compatibility. In fact, I stumbled across this because of some lisp
>> code doing "programmed completion", which doesn't work properly
>> with Emacs 23 anymore (because it accounts only for nil, t, and
>> `lambda').
> The intention is for it to 100% backwards compatible. So please
> report this bug.
Here we go.
To reproduce the problem, eval the following code:
(defvar my-keywords '("foo" "bar" "baz" "quux" "quuux"))
(defun my-complete (s pred mode)
(string-match "^\\(.*\\s-\\)?\\(.*\\)$" s)
(let* ((s1 (match-string 1 s))
(s2 (match-string 2 s))
(c2 (funcall
(cond ((null mode) 'try-completion)
((eq mode t) 'all-completions)
((eq mode 'lambda)
(if (fboundp 'test-completion)
'test-completion
;; XEmacs doesn't have test-completion
(lambda (&rest args)
(eq (apply 'try-completion args) t))))
(t 'ignore))
s2
(mapcar (lambda (x) (list (concat x " ")))
my-keywords)
pred)))
(if (stringp c2) (concat s1 c2) c2)))
(completing-read "Type some keywords: " 'my-complete)
Now type at the minibuffer prompt:
f TAB b TAB TAB
Emacs 21/22 (and XEmacs) behaviour:
Minibuffer: "Type some keywords: foo ba"
*Completions* buffer offers "bar" and "baz" as completions.
Emacs 23.0.60 behaviour:
Minibuffer: "Type some keywords: foo ba [No completions]"
(and no *Completions* buffer appears)
This bug report was last modified 16 years and 183 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.