[slime-devel] [PATCH] hyperspec.el: strip text properties from suggestion

Paul Collins paul at briny.ondioline.org
Thu Dec 7 06:11:33 UTC 2006


Paul Collins <paul at briny.ondioline.org> writes:

> When point is just after the slime prompt and the user does M-x
> hyperspec-lookup, the prompt is inserted into the minibuffer as a
> suggestion.  Text properties are retained, and so the user cannot
> delete the suggestion or even select the previous history entry.
>
> Here is a patch that corrects this problem by stripping all of the
> text properties from the suggestion.  A big hammer, perhaps, but I
> don't like seeing randomly-coloured text in the minibuffer anyway.

My original patch was broken: substring-no-properties does not like to
be called with a null argument.


Index: hyperspec.el
===================================================================
RCS file: /project/slime/cvsroot/slime/hyperspec.el,v
retrieving revision 1.10
diff -u -r1.10 hyperspec.el
--- hyperspec.el	28 Oct 2006 08:44:41 -0000	1.10
+++ hyperspec.el	7 Dec 2006 06:07:40 -0000
@@ -86,9 +86,10 @@
   (interactive (list (let* ((symbol-at-point (thing-at-point 'symbol))
 			    (stripped-symbol 
 			     (and symbol-at-point
-				  (downcase
-				   (common-lisp-hyperspec-strip-cl-package 
-				    symbol-at-point)))))
+				  (substring-no-properties
+				   (downcase
+				    (common-lisp-hyperspec-strip-cl-package 
+				     symbol-at-point))))))
                        (if (and stripped-symbol
                                 (intern-soft stripped-symbol
                                              common-lisp-hyperspec-symbols))

-- 
Paul Collins
Wellington, New Zealand

Dag vijandelijk luchtschip de huismeester is dood



More information about the slime-devel mailing list