[slime-devel] fix autodoc for functions with %-signs in their arglists

Lawrence Mitchell wence at gmx.li
Thu Apr 1 22:08:10 UTC 2004


Occasionally, I get errors when using slime-autodoc-mode, due to
arglists having %-signs in them.  This patch should fix the
problem.

Index: ChangeLog
===================================================================
RCS file: /project/slime/cvsroot/slime/ChangeLog,v
retrieving revision 1.319
diff -u -r1.319 ChangeLog
--- ChangeLog	1 Apr 2004 21:35:10 -0000	1.319
+++ ChangeLog	1 Apr 2004 22:07:38 -0000
@@ -1,3 +1,8 @@
+2004-04-01  Lawrence Mitchell  <wence at gmx.li>
+
+	* slime.el (slime-autodoc): Escape %-signs in arglist before
+	passing to format.
+
 2004-04-01  Helmut Eller  <e9626484 at stud3.tuwien.ac.at>
 
 	* swank-sbcl.lisp: Remove the non-working workarounds for


Index: slime.el
===================================================================
RCS file: /project/slime/cvsroot/slime/slime.el,v
retrieving revision 1.249
diff -u -r1.249 slime.el
--- slime.el	30 Mar 2004 23:10:46 -0000	1.249
+++ slime.el	1 Apr 2004 22:05:36 -0000
@@ -3223,6 +3223,9 @@
            (slime-buffer-package)
            (with-lexical-bindings (cache-key name)
              (lambda (arglist)
+               (let ((start 0))
+                 (while (setq start (1+ (string-match "%" arglist start)))
+                   (setq arglist (replace-match "%%" nil t arglist))))
                ;; FIXME: better detection of "no documentation available"
                (if (string-match "<not available>" arglist)
                    (setq arglist ""))

-- 
Lawrence Mitchell <wence at gmx.li>





More information about the slime-devel mailing list