Skip to content

Commit

Permalink
Add debug code snippets
Browse files Browse the repository at this point in the history
  • Loading branch information
la3280 committed Oct 21, 2022
1 parent 4a7c6ca commit efd204b
Showing 1 changed file with 29 additions and 1 deletion.
30 changes: 29 additions & 1 deletion emacs.rc
Original file line number Diff line number Diff line change
Expand Up @@ -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 <syslog.h>"
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
Expand Down

0 comments on commit efd204b

Please sign in to comment.