[slime-devel] slime-c-p-c
Madhu
enometh at meer.net
Mon May 5 15:19:22 UTC 2008
Re: slime-complete-symbol* : I noticed that slime-c-p-c does not work
correctly but can mangle text after a completion is chosen , [I'm
appending a test case to the end of this message.]
I'm afraid I'm to blame for this, I think: the patch I submitted
claiming to fix XEmacs behaviour (on 2007-08-04) and which was committed
on 2007-09-04 is incorrect [ 1. the analysis is not restricted to
XEmacs, and 2. Emacs choose-completion does not work right unless the
text in the buffer is a proper prefix of the completions displayed. I
cannot see any lowest-common-denominator solution for this.]
I would suggest reverting the patch. The downside is that you get back
the original behaviour, which mangles the text BEFORE the completion is
chosen: If you type "m-v" and hit TAB the function will delete your text
and leave you with "m" -- because "m" is emacs' completed-prefix
matching both "machine-version" and "multiple-value*"s. [This may or
may not be acceptable, indeed whether it is what you want would depend
on which buffer you are in, and what symbol you are trying to complete]
Apologies for the incomplete patch and the earlier noise over the
[unrelated yet related] unambiguous-prefix issue (from 06)..
--
Madhu
;;; PS: Here is a test case transcript, and also what to expect on the
;;; suggest fix :
;;;
;;; 1. First we recreate the situation in acl, where there are multiple
;;; completions for "l-p-t".
;;;
CL-USER> '(locale-print-time logical-pathname-translations
logical-pathname-translations-database-pathnames)
(LOCALE-PRINT-TIME LOGICAL-PATHNAME-TRANSLATIONS
LOGICAL-PATHNAME-TRANSLATIONS-DATABASE-PATHNAMES)
;;;
;;; 2. slime-c-p-c-unambiguous-prefix-p is set to nil
;;; BEFORE:
CL-USER> l-p-t
;;; ^^^ hit TAB, then choose the logical-pathname-translations
;;; completion in the *Completions* buffer
;;; AFTER: The completed form looks like:
CL-USER> (l-plogical-pathname-translations
;;;
;;; 3. Next try after setting slime-c-p-c-unambiguous-prefix-p nil
;;; BEFORE:
CL-USER> l-p-t
;;; ^^^ hit TAB, then choose the logical-pathname-translations
;;; completion in the *Completions* buffer
;;; AFTER:
CL-USER> (logical-pathname-translationsp-t
;;;
;;; 4.WITH 2007-09-04 PATCH REVERTED:
;;; BEFORE:
CL-USER> l-p-t
;;; ^^^ hit TAB, then choose the logical-pathname-translations
;;; completion in the *Completions* buffer
;;; AFTER:
CL-USER> (lo
^^^ note that the text you input is gone.
;;; but at least choosing a completion won't mangle the text in your
;;; buffer
More information about the slime-devel
mailing list