From 792d5166bb3a7ee0ec0048816352775f6a5a10cb Mon Sep 17 00:00:00 2001 From: Anders Hoff Date: Sat, 27 Jul 2024 17:42:50 +0200 Subject: [PATCH] handle special (vprogn) symbols in veq (in example script) --- bin/search-symbols.lisp | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/bin/search-symbols.lisp b/bin/search-symbols.lisp index d039ff9..71e8c93 100755 --- a/bin/search-symbols.lisp +++ b/bin/search-symbols.lisp @@ -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~&~%" _))))))