[slime-cvs] CVS slime/contrib

CVS User heller heller at common-lisp.net
Wed Dec 31 11:25:22 UTC 2008


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

Modified Files:
	ChangeLog inferior-slime.el 
Log Message:
* slime.el (slime-cd, slime-pwd): New commands.
(slime-change-directory): New function.
(slime-change-directory-hooks): New hook.

* inferior-slime.el (inferior-slime-change-directory): New
function.
(inferior-slime-init): Hook it in.

--- /project/slime/cvsroot/slime/contrib/ChangeLog	2008/12/30 19:04:06	1.156
+++ /project/slime/cvsroot/slime/contrib/ChangeLog	2008/12/31 11:25:22	1.157
@@ -29,6 +29,12 @@
 	operator name as first argument if point is located at the
 	operator name.
 
+2008-12-31  Helmut Eller  <heller at common-lisp.net>
+
+	* inferior-slime.el (inferior-slime-change-directory): New
+	function.
+	(inferior-slime-init): Hook it in.
+
 2008-12-27  Helmut Eller  <heller at common-lisp.net>
 
 	* slime-repl.el (slime-repl-event-hook-function): Handle
--- /project/slime/cvsroot/slime/contrib/inferior-slime.el	2008/12/26 07:22:56	1.4
+++ /project/slime/cvsroot/slime/contrib/inferior-slime.el	2008/12/31 11:25:22	1.5
@@ -69,6 +69,14 @@
       (insert ")")))
   (comint-send-input))
 
+(defun inferior-slime-change-directory (directory)
+  "Set default-directory in the *inferior-lisp* buffer to DIRECTORY."
+  (let* ((proc (slime-process))
+	 (buffer (and proc (process-buffer proc))))
+    (when buffer 
+      (with-current-buffer buffer
+	(cd-absolute directory)))))
+
 (defun inferior-slime-init-keymap ()
   (let ((map inferior-slime-mode-map))
     (slime-define-keys map
@@ -89,13 +97,14 @@
 (inferior-slime-init-keymap)
 
 (defun inferior-slime-hook-function ()
-  (inferior-slime-mode))
+  (inferior-slime-mode 1))
 
 (defun inferior-slime-switch-to-repl-buffer ()
   (switch-to-buffer (process-buffer (slime-inferior-process))))
 
 (defun inferior-slime-init ()
   (add-hook 'slime-inferior-process-start-hook 'inferior-slime-hook-function)
+  (add-hook 'slime-change-directory-hooks 'inferior-slime-change-directory)
   (def-slime-selector-method ?r
     "SLIME Read-Eval-Print-Loop."
     (inferior-slime-switch-to-repl-buffer)))





More information about the slime-cvs mailing list