apropos.lisp 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. (in-package :lilu-clim)
  2. (defmacro with-apropos-fn (&body body)
  3. `(let ((lilu-mcclim-apropos:*apropos-edit-fn*
  4. #'(lambda (file pos nline)
  5. (declare (ignore pos))
  6. (lilu-app:edit file :nline nline :wait-p nil)))
  7. (lilu-mcclim-apropos:*apropos-inspect-fn*
  8. #'(lambda (object)
  9. (lilu-app:inspect-object object :wait-p nil))))
  10. ,@body))
  11. (setf (lilu-app::application-entry-fn
  12. (lilu-app:find-app :package-apropos))
  13. #'(lambda (app &rest args)
  14. (declare (ignore app args))
  15. (with-apropos-fn
  16. (lilu-mcclim-apropos:run-package-apropos :new-process nil))))
  17. (setf (lilu-app::application-entry-fn
  18. (lilu-app:find-app :system-apropos))
  19. #'(lambda (app &rest args)
  20. (declare (ignore app args))
  21. (with-apropos-fn
  22. (lilu-mcclim-apropos:run-system-apropos :new-process nil))))
  23. (setf (lilu-app::application-entry-fn
  24. (lilu-app:find-app :command-table-apropos))
  25. #'(lambda (app &rest args)
  26. (declare (ignore app args))
  27. (with-apropos-fn
  28. (lilu-mcclim-apropos:run-command-table-apropos :new-process nil))))
  29. (setf (lilu-app::application-entry-fn
  30. (lilu-app:find-app :symbol-apropos))
  31. #'(lambda (app &rest args)
  32. (declare (ignore app args))
  33. (with-apropos-fn
  34. (lilu-mcclim-apropos:run-symbol-apropos :new-process nil))))
  35. (setf (lilu-app::application-entry-fn
  36. (lilu-app:find-app :class-apropos))
  37. #'(lambda (app &rest args)
  38. (declare (ignore app args))
  39. (with-apropos-fn
  40. (lilu-mcclim-apropos:run-class-apropos :new-process nil))))
  41. (setf (lilu-app::application-entry-fn
  42. (lilu-app:find-app :command-apropos))
  43. #'(lambda (app &rest args)
  44. (declare (ignore app args))
  45. (with-apropos-fn
  46. (lilu-mcclim-apropos:run-command-apropos :new-process nil))))