Change pp to treat all define-FOO symbols like define.
authorChris Hanson <org/chris-hanson/cph>
Mon, 6 Feb 2017 05:38:02 +0000 (21:38 -0800)
committerChris Hanson <org/chris-hanson/cph>
Mon, 6 Feb 2017 05:38:02 +0000 (21:38 -0800)
src/runtime/pp.scm

index a442d99663dc9d379d5a8311df4d29ecdea35590..592f3ab831561f9464335a6a8eb7b910fb5b5604 100644 (file)
@@ -410,7 +410,13 @@ USA.
       (let* ((subnodes (node-subnodes node))
             (association
              (and (not (null? (cdr subnodes)))
-                  (assq (unhighlight (car subnodes)) (dispatch-list)))))
+                  (let ((first (unhighlight (car subnodes))))
+                    (and (symbol? first)
+                         (assq (if (ustring-prefix? "define-"
+                                                    (symbol->string first))
+                                   'define
+                                   first)
+                               (dispatch-list)))))))
        (if (and (not association)
                 (fits-within? node column depth))
            (print-guaranteed-list-node node)