From efd204b257d907a1bc0bd64aa70fb3eb31db135e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luiz=20A=2E=20B=C3=BChnemann?= Date: Fri, 21 Oct 2022 16:18:20 -0300 Subject: [PATCH] Add debug code snippets --- emacs.rc | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/emacs.rc b/emacs.rc index 52f959f..a767c9c 100644 --- a/emacs.rc +++ b/emacs.rc @@ -211,7 +211,35 @@ bind-to-key execute-macro-40 M-? !endif !endm - + +35 store-macro + insert-string "syslog(LOG_INFO, " + insert-string &chr 34 + insert-string "%s:%s %i" + insert-string &chr 34 + insert-string ", __FILE__, __FUNCTION__, __LINE__);" + write-message "(Debug syslog)" +!endm + + + +34 store-macro + insert-string "#include " + write-message "(Debug syslog)" +!endm + +33 store-macro + insert-string "printf(" + insert-string &chr 34 + insert-string "%s:%s %i\n" + insert-string &chr 34 + insert-string ", __FILE__, __FUNCTION__, __LINE__);" + write-message "(Debug stdout)" +!endm + +bind-to-key execute-macro-34 ^X9 +bind-to-key execute-macro-35 ^X8 +bind-to-key execute-macro-33 ^X7 bind-to-key execute-macro-36 M-FNR ; Setup for ASCII {|}[\] to ISO Latin-1 translation