From: Mark Wooding Date: Wed, 7 Aug 2019 16:21:40 +0000 (+0100) Subject: src/parser/streams-impl.lisp: Use slot accessor rather than `with-slots'. X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~mdw/git/sod/commitdiff_plain/cfbd2831807822f12fa32c781d50f54a6a2ea91d?hp=3ee33e04477ace9d13587f28253fb8c6d1c7ed6c src/parser/streams-impl.lisp: Use slot accessor rather than `with-slots'. The code is a bit longer, but I think it's more comfortable to read. --- diff --git a/src/parser/streams-impl.lisp b/src/parser/streams-impl.lisp index f14bf31..b3bb424 100644 --- a/src/parser/streams-impl.lisp +++ b/src/parser/streams-impl.lisp @@ -224,8 +224,8 @@ (defmethod stream-pathname ((stream position-aware-stream)) present back to a user. Secondly, a name can be attached to a stream which doesn't actually have a file backing it." - (with-slots (file) stream - (or file (call-next-method)))) + (or (position-aware-stream-file stream) + (call-next-method))) (defmethod file-location ((stream position-aware-stream)) (multiple-value-bind (line column) (stream-line-and-column stream)