[slime-cvs] CVS slime

mkoeppe mkoeppe at common-lisp.net
Sat Mar 18 07:43:37 UTC 2006


Update of /project/slime/cvsroot/slime
In directory clnet:/tmp/cvs-serv19752

Modified Files:
	slime.el 
Log Message:
(slime-goto-location-buffer): Avoid calling the expensive function
find-file-noselect when we are already in the right buffer.

(slime-autodoc): Use :print-right-margin here to make use of the whole
width of the echo area for arglist display.


--- /project/slime/cvsroot/slime/slime.el	2006/03/16 12:51:08	1.597
+++ /project/slime/cvsroot/slime/slime.el	2006/03/18 07:43:37	1.598
@@ -2351,8 +2351,14 @@
                   (re-search-forward regexp nil t)))
         (goto-char (match-end 0))
         (skip-chars-forward " \n\t\f\r#'")
-        (let ((pkg (ignore-errors (read (current-buffer)))))
-          (if pkg (format "%S" pkg)))))))
+        (cond 
+         ((looking-at "\\.\\*swig-module-name\\*") ; # was skipped
+          (if (re-search-backward "(defparameter \\*swig-module-name\\* \\(:?\\sw*\\))"
+                                  nil t)
+              (match-string-no-properties 1)))
+         (t
+          (let ((pkg (ignore-errors (read (current-buffer)))))
+            (if pkg (format "%S" pkg)))))))))
 
 ;;; Synchronous requests are implemented in terms of asynchronous
 ;;; ones. We make an asynchronous request with a continuation function
@@ -4926,7 +4932,10 @@
 (defun slime-goto-location-buffer (buffer)
   (destructure-case buffer
     ((:file filename)
-     (set-buffer (find-file-noselect (slime-from-lisp-filename filename) t))
+     (let ((emacs-filename (slime-from-lisp-filename filename)))
+       (unless (and (buffer-file-name)
+                    (string= (buffer-file-name) emacs-filename))
+         (set-buffer (find-file-noselect emacs-filename t))))
      (goto-char (point-min)))
     ((:buffer buffer)
      (set-buffer buffer)
@@ -5360,7 +5369,10 @@
           (slime-eval-async
            (if (slime-global-variable-name-p name)
                `(swank:variable-desc-for-echo-area ,name)
-             `(swank:arglist-for-echo-area '(,name)))
+             `(swank:arglist-for-echo-area '(,name)
+                                           :print-right-margin 
+                                           ,(window-width
+                                             (minibuffer-window))))
            (with-lexical-bindings (cache-key name)
              (lambda (doc)
                (if (null doc)




More information about the slime-cvs mailing list