[slime-devel] [patch] color slime-repl mode line

Stanislaw Halik sthalik at test123.ltd.pl
Sat Sep 12 21:47:59 UTC 2009


When the REPL is started without lisp-mode windows, the arglist isn't
fontified until something is „M-x slime-mode”'d because of this:

[slime-autodoc.el]
(defun slime-fontify-string (string)
  "Fontify STRING as `font-lock-mode' does in Lisp mode."
  (with-current-buffer (get-buffer-create " *slime-fontify*")
    (erase-buffer)
    (unless (eq major-mode 'lisp-mode)
      (lisp-mode)
      (slime-autodoc-mode -1)
      ...)
    ...))

…and „slime-autodoc-mode” sets „slime-echo-arglist-function” when arg
satisfies „minusp”.

So i made an ugly patch to fix it. Here it goes:

diff --git a/contrib/slime-autodoc.el b/contrib/slime-autodoc.el
index 524539d..e69a65c 100644
--- a/contrib/slime-autodoc.el
+++ b/contrib/slime-autodoc.el
@@ -184,7 +184,11 @@ Return DOCUMENTATION."
     (erase-buffer)
     (unless (eq major-mode 'lisp-mode)
       (lisp-mode)
-      (slime-autodoc-mode -1)
+      (let ((slime-echo-arglist-function slime-echo-arglist-function)
+            (slime-autodoc-mode slime-autodoc-mode)
+            (eldoc-idle-delay eldoc-idle-delay)
+            (eldoc-documentation-function eldoc-documentation-function))
+        (slime-autodoc-mode -1))
       (set (make-local-variable 'slime-highlight-suppressed-forms) nil))
     (insert string)
     (let ((font-lock-verbose nil))

-- 
polscy Lispnicy, łączmy się -- #lisp-pl na freenode





More information about the slime-devel mailing list