Stefan Monnier writes: >> (defun completion-emacs22-try-completion (string table pred point) >> (let ((suffix (substring string point)) >> (completion (try-completion (substring string 0 point) table pred))) >> - (if (not (stringp completion)) >> - completion >> + (cond >> + ((eq completion t) >> + ;; The prefix is an exact and unique completion, but STRING >> + ;; might not be a completion. >> + (if (test-completion string table) >> + t >> + (cons string point))) > > I think we should test (equal "" suffix) instead. > The cases where (equal "" suffix) is false but (test-completion string table) > are sufficiently weird that returning t seems risky and I can't think of > any reason why it's worthwhile to take this risk. True. I was thinking about the case where STRING is a completion, so it would be nice to just return t. But that would be caught by other completion styles before emacs22 anyway. Fixed.