From 4a0002707d9e7b4c6f59f0d68926a73953230e63 Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Sun, 25 Jul 2010 00:54:24 -0700 Subject: [PATCH] Broaden handling of pstring to accept NIL. --- src/runtime/swank.scm | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/runtime/swank.scm b/src/runtime/swank.scm index 932be4c18..4e1b261bc 100644 --- a/src/runtime/swank.scm +++ b/src/runtime/swank.scm @@ -193,7 +193,7 @@ USA. ;;;; Message handlers -(define-message-handler '(':emacs-rex form string datum index) +(define-message-handler '(':emacs-rex form datum datum index) (lambda (socket level sexp pstring thread id) thread (call-with-current-continuation @@ -209,7 +209,10 @@ USA. socket))))))) (define (emacs-rex socket sexp pstring) - (fluid-let ((*buffer-pstring* pstring)) + (fluid-let ((*buffer-pstring* + (cond ((emacs-false? pstring) #f) + ((string? pstring) pstring) + (else (error:bad-range-argument pstring 'EMACS-REX))))) (eval (cons* (car sexp) socket (cdr sexp)) swank-env))) @@ -219,7 +222,8 @@ USA. (the-environment)) (define (buffer-env) - (if (string-ci=? *buffer-pstring* "COMMON-LISP-USER") + (if (or (not *buffer-pstring*) + (string-ci=? *buffer-pstring* "COMMON-LISP-USER")) (get-current-environment) (pstring->env *buffer-pstring*))) -- 2.25.1