File: init-tryout.el

package info (click to toggle)
lua-mode 20210802-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 480 kB
  • sloc: lisp: 3,132; makefile: 40; sh: 21
file content (13 lines) | stat: -rw-r--r-- 454 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
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)