X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcode%2Fpprint.lisp;h=af4eaa267b505e911276081f687c33d605bc4b9d;hb=dc33d6a6b84f8338e603759cec8e25da29055d50;hp=8c084d63ac546d764dca1be6bb114aae65f9dde6;hpb=988afd9d54ba6c8a915544822658824ab6ae0d6c;p=sbcl.git diff --git a/src/code/pprint.lisp b/src/code/pprint.lisp index 8c084d6..af4eaa2 100644 --- a/src/code/pprint.lisp +++ b/src/code/pprint.lisp @@ -1099,10 +1099,21 @@ (defun pprint-flet (stream list &rest noise) (declare (ignore noise)) - (funcall (formatter - "~:<~^~W~^ ~@_~:<~@{~:<~^~W~^~3I ~:_~/SB!PRETTY:PPRINT-LAMBDA-LIST/~1I~:@_~@{~W~^ ~_~}~:>~^ ~_~}~:>~1I~@:_~@{~W~^ ~_~}~:>") - stream - list)) + (if (and (consp list) + (consp (cdr list)) + (cddr list)) + (funcall (formatter + "~:<~^~W~^ ~@_~:<~@{~:<~^~W~^~3I ~:_~/SB!PRETTY:PPRINT-LAMBDA-LIST/~1I~:@_~@{~W~^ ~_~}~:>~^ ~_~}~:>~1I~@:_~@{~W~^ ~_~}~:>") + stream + list) + ;; for printing function names like (flet foo) + (pprint-logical-block (stream list :prefix "(" :suffix ")") + (pprint-exit-if-list-exhausted) + (write (pprint-pop) :stream stream) + (loop + (pprint-exit-if-list-exhausted) + (write-char #\space stream) + (write (pprint-pop) :stream stream))))) (defun pprint-let (stream list &rest noise) (declare (ignore noise))