[slime-cvs] CVS slime

CVS User heller heller at common-lisp.net
Sat Dec 27 18:24:29 UTC 2008


Update of /project/slime/cvsroot/slime
In directory cl-net:/tmp/cvs-serv6195

Modified Files:
	ChangeLog slime.el swank.lisp 
Log Message:
Move slime-lisp-package to slime-repl.el

* swank.lisp (create-repl): Return initial package and prompt.

* slime-repl.el (slime-repl-event-hook-function): Handle
:new-package events here.
(slime-output-buffer): Initialize slime-buffer-package.
(slime-repl-connected-hook-function): Initialize slime-lisp-package.

--- /project/slime/cvsroot/slime/ChangeLog	2008/12/26 07:22:40	1.1604
+++ /project/slime/cvsroot/slime/ChangeLog	2008/12/27 18:24:28	1.1605
@@ -1,3 +1,10 @@
+2008-12-27  Helmut Eller  <heller at common-lisp.net>
+
+	* slime.el: Move slime-lisp-package and
+	slime-lisp-package-prompt-string to slime-repl.el
+
+	* swank.lisp (create-repl): Return initial package and prompt.
+
 2008-12-25  Helmut Eller  <heller at common-lisp.net>
 
 	Don't restore window configs in sldb.
--- /project/slime/cvsroot/slime/slime.el	2008/12/26 07:23:20	1.1082
+++ /project/slime/cvsroot/slime/slime.el	2008/12/27 18:24:28	1.1083
@@ -1943,16 +1943,6 @@
 (slime-def-connection-var slime-lisp-modules '()
   "The strings of Lisp's *MODULES*.")
 
-(slime-def-connection-var slime-lisp-package
-    "COMMON-LISP-USER"
-  "The current package name of the Superior lisp.
-This is automatically synchronized from Lisp.")
-
-(slime-def-connection-var slime-lisp-package-prompt-string
-    "CL-USER"
-  "The current package name of the Superior lisp.
-This is automatically synchronized from Lisp.")
-
 (slime-def-connection-var slime-pid nil
   "The process id of the Lisp process.")
 
@@ -2017,9 +2007,6 @@
             (slime-communication-style) style
             (slime-lisp-features) features
             (slime-lisp-modules) modules)
-      (destructuring-bind (&key name prompt) package
-        (setf (slime-lisp-package) name
-              (slime-lisp-package-prompt-string) prompt))
       (destructuring-bind (&key type name version) lisp-implementation
         (setf (slime-lisp-implementation-type) type
               (slime-lisp-implementation-version) version
@@ -2202,15 +2189,11 @@
 (defun slime-current-package ()
   "Return the Common Lisp package in the current context.
 If `slime-buffer-package' has a value then return that, otherwise
-search for and read an `in-package' form.
-
-The REPL buffer is a special case: its package is `slime-lisp-package'."
-  (cond ;;((eq major-mode 'slime-repl-mode)
-        ;; (slime-lisp-package))
-        (slime-buffer-package)
-        (t (save-restriction
-             (widen)
-             (slime-find-buffer-package)))))
+search for and read an `in-package' form."
+  (or slime-buffer-package
+      (save-restriction
+        (widen)
+        (slime-find-buffer-package))))
 
 (defvar slime-find-buffer-package-function 'slime-search-buffer-package
   "*Function to use for `slime-find-buffer-package'.  
@@ -2380,10 +2363,6 @@
            (slime-y-or-n-p thread tag question))
           ((:emacs-return-string thread tag string)
            (slime-send `(:emacs-return-string ,thread ,tag ,string)))
-          ;;
-          ((:new-package package prompt-string)
-           (setf (slime-lisp-package) package)
-           (setf (slime-lisp-package-prompt-string) prompt-string))
           ((:new-features features)
            (setf (slime-lisp-features) features))
           ((:indentation-update info)
@@ -3879,8 +3858,8 @@
 (defun slime-edit-definition-cont (xrefs name where)
   (destructuring-bind (1loc file-alist) (slime-analyze-xrefs xrefs)
     (cond ((null xrefs) 
-           (error "No known definition for: %s (in %s)" 
-                  name (or (slime-current-package) (slime-lisp-package))))
+           (error "No known definition for: %s (in %s)"
+                  name (slime-current-package)))
           (1loc
            (slime-push-definition-stack)
            (slime-pop-to-location (slime-xref.location (car xrefs)) where))
@@ -6156,8 +6135,6 @@
     (set (make-local-variable 'truncate-lines) t)))
 
 (slime-define-keys slime-connection-list-mode-map
-  ;;((kbd "RET") 'slime-goto-connection)
-  ;;([return] 'slime-goto-connection)
   ("d"         'slime-connection-list-make-default)
   ("g"         'slime-update-connection-list)
   ((kbd "C-k") 'slime-quit-connection-at-point)
@@ -6167,12 +6144,6 @@
   (or (get-text-property (point) 'slime-connection)
       (error "No connection at point")))
 
-;;(defun slime-goto-connection ()
-;;  "Switch to the REPL buffer for the connection at point."
-;;  (interactive)
-;;  (let ((slime-dispatching-connection (slime-connection-at-point)))
-;;    (switch-to-buffer (slime-output-buffer))))
-
 (defun slime-quit-connection-at-point (connection)
   (interactive (list (slime-connection-at-point)))
   (let ((slime-dispatching-connection connection)
@@ -8007,7 +7978,7 @@
     (if (slime-cl-symbol-package s)
         s
       (format "%s::%s"
-              (let* ((package (or (slime-current-package) (slime-lisp-package))))
+              (let* ((package (slime-current-package)))
                 ;; package is a string like ":cl-user" or "CL-USER", or "\"CL-USER\"".
                 (if package
                     (slime-pretty-package-name package)
--- /project/slime/cvsroot/slime/swank.lisp	2008/12/24 08:14:12	1.616
+++ /project/slime/cvsroot/slime/swank.lisp	2008/12/27 18:24:29	1.617
@@ -1498,9 +1498,10 @@
               (*debug-io*        . ,(@ user-io))
               (*query-io*        . ,(@ user-io))
               (*terminal-io*     . ,(@ user-io))))
-      (when (eq (@ communication-style) :spawn)
+      (when (use-threads-p)
         (setf (@ repl-thread) (spawn-repl-thread conn "repl-thread")))
-      t)))
+      (list (package-name *package*)
+            (package-string-for-prompt *package*)))))
 
 (defun initialize-streams-for-connection (connection)
   (multiple-value-bind (dedicated in out io repl-results) 





More information about the slime-cvs mailing list