[slime-cvs] CVS slime
heller
heller at common-lisp.net
Tue Jul 29 11:03:32 UTC 2008
Update of /project/slime/cvsroot/slime
In directory clnet:/tmp/cvs-serv2958
Modified Files:
ChangeLog NEWS slime.el
Log Message:
Environment variables for Lisp process.
Patch by Richard M Kreuter.
* slime.el (slime-start, slime-maybe-start-lisp)
(slime-reinitialize-inferior-lisp-p, slime-start-lisp)
(slime-restart-sentinel): Pass new parameter "env" through.
--- /project/slime/cvsroot/slime/ChangeLog 2008/07/29 11:03:25 1.1377
+++ /project/slime/cvsroot/slime/ChangeLog 2008/07/29 11:03:31 1.1378
@@ -1,5 +1,13 @@
2008-07-29 Richard M Kreuter <kreuter at progn.net>
+ Environment variables for Lisp process.
+
+ * slime.el (slime-start, slime-maybe-start-lisp)
+ (slime-reinitialize-inferior-lisp-p, slime-start-lisp)
+ (slime-restart-sentinel): Pass new parameter "env" through.
+
+2008-07-29 Richard M Kreuter <kreuter at progn.net>
+
* swank-sbcl.lisp (add-sigio-handler, add-fd-handler): Be quiet
as a workaround for non-properly initialized *debug-io*.
--- /project/slime/cvsroot/slime/NEWS 2007/11/27 11:50:13 1.9
+++ /project/slime/cvsroot/slime/NEWS 2008/07/29 11:03:31 1.10
@@ -2,6 +2,15 @@
* 3.0 (not released yet)
+** Environment variables for Lisp process
+slime-lisp-implementations can be used to specify a list of strings to
+augment the process environment of the Lisp process. E.g.:
+
+ (sbcl-cvs
+ ("/home/me/sbcl-cvs/src/runtime/sbcl"
+ "--core" "/home/me/sbcl-cvs/output/sbcl.core")
+ :env ("SBCL_HOME=/home/me/sbcl-cvs/contrib/"))
+
** Removed Features
Some of the more esoteric features, like presentations or fuzzy
completion, are no longer enabled by default. A new directory
--- /project/slime/cvsroot/slime/slime.el 2008/07/29 11:03:20 1.951
+++ /project/slime/cvsroot/slime/slime.el 2008/07/29 11:03:31 1.952
@@ -1125,14 +1125,15 @@
(init 'slime-init-command)
name
(buffer "*inferior-lisp*")
- init-function)
+ init-function
+ env)
(let ((args (list :program program :program-args program-args :buffer buffer
:coding-system coding-system :init init :name name
- :init-function init-function)))
+ :init-function init-function :env env)))
(slime-check-coding-system coding-system)
(when (slime-bytecode-stale-p)
(slime-urge-bytecode-recompile))
- (let ((proc (slime-maybe-start-lisp program program-args
+ (let ((proc (slime-maybe-start-lisp program program-args env
directory buffer)))
(slime-inferior-connect proc args)
(pop-to-buffer (process-buffer proc)))))
@@ -1240,33 +1241,34 @@
;;; Starting the inferior Lisp and loading Swank:
-(defun slime-maybe-start-lisp (program program-args directory buffer)
+(defun slime-maybe-start-lisp (program program-args env directory buffer)
"Return a new or existing inferior lisp process."
(cond ((not (comint-check-proc buffer))
- (slime-start-lisp program program-args directory buffer))
- ((slime-reinitialize-inferior-lisp-p program program-args buffer)
+ (slime-start-lisp program program-args env directory buffer))
+ ((slime-reinitialize-inferior-lisp-p program program-args env buffer)
(when-let (conn (find (get-buffer-process buffer) slime-net-processes
:key #'slime-inferior-process))
(slime-net-close conn))
(get-buffer-process buffer))
- (t (slime-start-lisp program program-args
- directory
+ (t (slime-start-lisp program program-args env directory
(generate-new-buffer-name buffer)))))
-(defun slime-reinitialize-inferior-lisp-p (program program-args buffer)
+(defun slime-reinitialize-inferior-lisp-p (program program-args env buffer)
(let ((args (slime-inferior-lisp-args (get-buffer-process buffer))))
(and (equal (plist-get args :program) program)
(equal (plist-get args :program-args) program-args)
+ (equal (plist-get args :env) env)
(not (y-or-n-p "Create an additional *inferior-lisp*? ")))))
-(defun slime-start-lisp (program program-args directory buffer)
+(defun slime-start-lisp (program program-args env directory buffer)
"Does the same as `inferior-lisp' but less ugly.
Return the created process."
(with-current-buffer (get-buffer-create buffer)
(when directory
(cd (expand-file-name directory)))
(comint-mode)
- (comint-exec (current-buffer) "inferior-lisp" program nil program-args)
+ (let ((process-environment (append env process-environment)))
+ (comint-exec (current-buffer) "inferior-lisp" program nil program-args))
(lisp-mode-variables t)
(let ((proc (get-buffer-process (current-buffer))))
(slime-set-query-on-exit-flag proc)
@@ -3705,7 +3707,7 @@
(slime-eval-async '(swank:quit-lisp))
(set-process-filter (slime-connection) nil)
(set-process-sentinel (slime-connection) 'slime-restart-sentinel))
-
+
(defun slime-restart-sentinel (process message)
"Restart the inferior lisp process.
Also rearrange windows."
@@ -3716,6 +3718,7 @@
(buffer-window (get-buffer-window buffer))
(new-proc (slime-start-lisp (plist-get args :program)
(plist-get args :program-args)
+ (plist-get args :env)
nil
buffer))
(repl-buffer (slime-repl-buffer nil process))
@@ -5575,7 +5578,7 @@
(((:labels :flet) &rest _)
(slime-read-from-minibuffer "(Un)trace local function: "
(prin1-to-string spec)))
- (t (error "Don't know how to trace the spec ~S" spec))))))
+ (t (error "Don't know how to trace the spec %S" spec))))))
(defun slime-extract-context ()
"Parse the context for the symbol at point.
@@ -6049,7 +6052,7 @@
XREF-ALIST is of the form ((GROUP . ((LABEL LOCATION) ...)) ...).
GROUP and LABEL are for decoration purposes. LOCATION is a
source-location."
- (loop for (group . refs) in xrefs do
+ (loop for (group . refs) in xref-alist do
(slime-insert-propertized '(face bold) group "\n")
(loop for (label location) in refs do
(slime-insert-propertized (list 'slime-location location
@@ -8620,7 +8623,7 @@
(let ((slime-buffer-package "SWANK")
(symbol '*buffer-package*))
(slime-edit-definition (symbol-name symbol))
- (slime-check ("Checking that we've got M-. into swank.lisp." symbol)
+ (slime-check ("Checking that we've got M-. into swank.lisp. %S" symbol)
(string= (file-name-nondirectory (buffer-file-name))
"swank.lisp"))
(slime-pop-find-definition-stack)
More information about the slime-cvs
mailing list