Skip to content

Commit

Permalink
handle special (vprogn) symbols in veq (in example script)
Browse files Browse the repository at this point in the history
  • Loading branch information
inconvergent committed Jul 27, 2024
1 parent 72df650 commit 792d516
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions bin/search-symbols.lisp
Original file line number Diff line number Diff line change
@@ -1,12 +1,20 @@
(in-package :lqn)

(let ((q (second (cmd-args))) (pkg (third (cmd-args))))
(qry (ls "~/common-lisp/*/src/packages.lisp")
(block main
(let ((q (second (cmd-args)))
(pkg (third (cmd-args)))
(veq-symbs (vec! veq::*docstring-map*)))
(labels ((veq-special (s &aux (res (and (equal "VEQ" (package-name (symbol-package s)))
(second (find s veq-symbs :key #'car)))))
(when res (str! "veq:" s " (vprogn)" #\Newline res))))
(unless q (return-from main))
(qry (ls "~/common-lisp/*/src/packages.lisp")
dat-read-file _@flatn* second ; package names
[(or (not pkg) (isub? s@_ pkg))] extsym? _@flatn* ; filter packages
[(or (string= s@q "_") (isub? s@_ q))] ; filter symbol ; _ matches all
#((join (head (splt (stdstr _@describe)
#((join (head (splt (or (veq-special _)
(stdstr _@describe))
#.(str! #\Newline) nil) -1) ; some formatting
#\Newline ";; ")
(out "~&~&██ ~a~&~%" _))))
(out "~&~&██ ~a~&~%" _))))))

0 comments on commit 792d516

Please sign in to comment.