Slime Tips

Little known features of Slime.

2 notes &

Expanding format strings

M-x slime-format-string-expand: expands the format control string at point.

 ”~a, ~a.” on SBCL yields

#'(LAMBDA
      (STREAM
       &OPTIONAL
       (#:FORMAT-ARG1502
        (ERROR 'SB-FORMAT:FORMAT-ERROR :COMPLAINT "required argument missing"
               :CONTROL-STRING "~a, ~a." :OFFSET 1))
       (#:FORMAT-ARG1503
        (ERROR 'SB-FORMAT:FORMAT-ERROR :COMPLAINT "required argument missing"
               :CONTROL-STRING "~a, ~a." :OFFSET 5))
       &REST SB-FORMAT::ARGS)
    (DECLARE (IGNORABLE STREAM))
    (BLOCK NIL
      (PRINC #:FORMAT-ARG1502 STREAM)
      (WRITE-STRING ", " STREAM)
      (PRINC #:FORMAT-ARG1503 STREAM)
      (WRITE-STRING "." STREAM))
    SB-FORMAT::ARGS)
  1. bowbow99 reblogged this from slime-tips
  2. morionblack reblogged this from slime-tips
  3. slime-tips posted this