From: Ulrich Mueller <ulm@gentoo.org>
To: emacs-pretest-bug@gnu.org
Subject: bug#1797: 23.0.60; completing-read breaks backwards compatibility
Date: Tue, 6 Jan 2009 00:53:31 +0100 [thread overview]
Message-ID: <18786.40315.242106.507079@a1ihome1.kph.uni-mainz.de> (raw)
>>>>> 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)
next reply other threads:[~2009-01-05 23:53 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-05 23:53 Ulrich Mueller [this message]
2009-01-06 4:24 ` bug#1797: 23.0.60; completing-read breaks backwards compatibility Stefan Monnier
2009-01-06 9:34 ` Ulrich Mueller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=18786.40315.242106.507079@a1ihome1.kph.uni-mainz.de \
--to=ulm@gentoo.org \
--cc=1797@emacsbugs.donarmstrong.com \
--cc=emacs-pretest-bug@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.