branch: elpa/lua-mode
commit 92d9729ce94544e71132af0e73e3b04ec63a5788
Author: immerrr <[email protected]>
Commit: immerrr <[email protected]>

    Add init-tryout.el to persistent initialization code
---
 Makefile       |  2 +-
 init-tryout.el | 13 +++++++++++++
 2 files changed, 14 insertions(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index 1c57ce8..9e38313 100644
--- a/Makefile
+++ b/Makefile
@@ -54,4 +54,4 @@ release:
 
 
 tryout:
-       cask exec $(EMACS) -Q -l lua-mode.el test.lua
+       cask exec $(EMACS) -Q -l init-tryout.el test.lua
diff --git a/init-tryout.el b/init-tryout.el
new file mode 100644
index 0000000..90355d4
--- /dev/null
+++ b/init-tryout.el
@@ -0,0 +1,13 @@
+(load-file "lua-mode.el")
+
+(defmacro add-trace-for (fn)
+  (let ((trace-fn-name (intern (concat "trace--" (symbol-name fn)))))
+    `(progn
+       (defun ,trace-fn-name (&rest args)
+        (message "%s was called with: %S" #',fn args))
+       (add-function :before (symbol-function #',fn) #',trace-fn-name))))
+
+
+;; (add-trace-for font-lock-fontify-region)
+;; (add-trace-for font-lock-unfontify-region)
+;; (add-trace-for lua--propertize-multiline-bounds)

Reply via email to