[slime-devel] Fancy, yes, pleasant, no: slime-complete-symbol*-fancy-bit
Steven E. Harris
seh at panix.com
Fri Mar 18 18:00:52 UTC 2005
I have my '[' key bound to `insert-parentheses' so that any open-paren
I type gets a symmetric closing paren inserted. Consider what happens
now when I type, say,
[ user-home TAB
Just before hitting tab, the buffer contains the following text, with
extra spaces inserted to show the point's location:
( u s e r - h o m e )
|
point
Hitting tab completes the symbol, but decides, since this looks like a
function call position and there are no arguments for this function,
to insert a closing paren:
(user-homedir-pathname))
Now I have an extra closing paren hanging out there.
That's `slime-complete-symbol*-fancy-bit' doing its job.
A corrective patch is simple:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: slime.el.diff
Type: text/x-patch
Size: 550 bytes
Desc: not available
URL: <https://mailman.common-lisp.net/pipermail/slime-devel/attachments/20050318/ca8884b1/attachment.bin>
-------------- next part --------------
However, this may not play nicely for those who do not use
`insert-parentheses' in a situation such as this:
Existing code:
(foo 1 2)
Decide to add a third argument (spaced out again):
( f o o 1 2 ( b a )
|
point
Hit tab at the indicated point position and wind up with:
(foo 1 2 (bar)
Now the originally balanced parens are not balanced, because my patch
disabled the auto-insert-paren behavior.
Is there a way to satisfy both use cases without adding another
configuration variable?
--
Steven E. Harris
More information about the slime-devel
mailing list