dunlin

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit 0c3091632f80c5114c5076023ba8671f1e2fff26
parent 2743c3ece027b0359407909a25859b4c9f09517a
Author: Daniel Barlow <dan@telent.net>
Date:   Tue, 10 Sep 2024 17:53:15 +0100

add importable trace macro

Diffstat:
Mbuffer.fnl | 1+
Mkeymap.fnl | 1+
Amacros.fnl | 7+++++++
3 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/buffer.fnl b/buffer.fnl @@ -1,5 +1,6 @@ (local { : Gtk : Gdk : WebKit2 : cairo } (require :lgi)) (local { : view } (require :fennel)) +(import-macros {: trace} :macros) (fn new-buffer [name] (var property-change-listener nil) diff --git a/keymap.fnl b/keymap.fnl @@ -1,6 +1,7 @@ (local { : Gdk } (require :lgi)) (local { : view } (require :fennel)) (local lume (require :lume)) +(import-macros {: trace} :macros) (local modifier-keyvals ;; we need to detect and discard modifier-only key events when diff --git a/macros.fnl b/macros.fnl @@ -0,0 +1,7 @@ + +(fn trace [x] + `(do + (print :trace ,(view x) (view ,x)) + ,x)) + +{ : trace }