diff --git a/src/c/cfun.d b/src/c/cfun.d index d09fce219..0bddcd4a5 100644 --- a/src/c/cfun.d +++ b/src/c/cfun.d @@ -123,7 +123,7 @@ cl_object cl_function_lambda_expression(cl_object fun) { cl_env_ptr the_env = ecl_process_env(); - cl_object output, name = Cnil, lex = Cnil; + cl_object output, name = Cnil, lex = Cnil, definition = Cnil; switch(type_of(fun)) { case t_bclosure: @@ -133,7 +133,7 @@ cl_function_lambda_expression(cl_object fun) name = fun->bytecodes.name; output = fun->bytecodes.definition; if (!CONSP(output)) - output = Cnil; + { definition = output; output = Cnil; } else if (name == Cnil) output = cl_cons(@'lambda', output); else if (name != @'si::bytecodes') @@ -162,7 +162,7 @@ cl_function_lambda_expression(cl_object fun) default: FEinvalid_function(fun); } - @(return output lex name) + @(return output lex name definition) } cl_object diff --git a/src/lsp/top.lsp b/src/lsp/top.lsp index c3420df46..3fe207354 100644 --- a/src/lsp/top.lsp +++ b/src/lsp/top.lsp @@ -796,7 +796,7 @@ under certain conditions; see file 'Copyright' for details.") (format t "~:[~;Local functions: ~:*~{~s~^, ~}.~%~]" functions) (format t "~:[~;Block names: ~:*~{~s~^, ~}.~%~]" blocks) - ;; This format is the what was in the orignal code. + ;; This format is what was in the orignal code. ;; It simply does not work when no-values is t. ;; If you care to debug this kind of conundrum then have fun! ;;(format t "Local variables: ~:[~:[none~;~:*~{~a~1*~:@{, ~a~1*~}~}~]~;~ @@ -829,7 +829,7 @@ under certain conditions; see file 'Copyright' for details.") (string-equal s1 s2) nil))))) (when val-pair - (format t "~&In tpl-inspect-command: val-pair = ~S~%" val-pair) + ;;(format t "~&In tpl-inspect-command: val-pair = ~S~%" val-pair) (let ((val (cdr val-pair))) (inspect val))))) @@ -875,8 +875,9 @@ under certain conditions; see file 'Copyright' for details.") ;;(format t "~:[~; >~] ~S" b (ihs-fname i)) ;; JCB (format t " > ~S" func-name) (when (eq func-name 'si::bytecodes) - (format t " [Evaluation of: ~S]" - (function-lambda-expression (ihs-fun i)))) + (multiple-value-bind (lform lex name def) + (function-lambda-expression (ihs-fun i)) + (format t " [Evaluation of: ~S]" (if lform lform def)))) (terpri) ))) (progn @@ -902,7 +903,9 @@ under certain conditions; see file 'Copyright' for details.") ;;(format t "~:[~; >~] ~S" b (ihs-fname i)) ;; JCB (format t " > ~S" (ihs-fname i)) (when (eq func-name 'si::bytecodes) - (format t " [Evaluation of: ~S]" (function-lambda-expression (ihs-fun i)))) + (multiple-value-bind (lform lex name def) + (function-lambda-expression (ihs-fun i)) + (format t " [Evaluation of: ~S]" (if lform lform def)))) (terpri) )))) )