Created
August 17, 2022 03:13
-
-
Save mlabbe/51cd530069c6468c5a62cebdd632394d to your computer and use it in GitHub Desktop.
remedybg emacs minor mode (not ready for primetime)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; | |
;; remedybg minor mode | |
;; | |
;; 0.1 by Michael Labbe | |
;; | |
(setq remedybg-path "c:/remedydbg/remedybg.exe") | |
(defun remedybg-add-breakpoint-at-file() | |
(interactive) | |
(call-process-shell-command (format "%s add-breakpoint-at-file %s %d" remedybg-path buffer-file-name (line-number-at-pos)) nil 0) | |
) | |
(defun remedybg-start-debugging() | |
(interactive) | |
(call-process-shell-command (format "%s start-debugging" remedybg-path) nil 0) | |
) | |
(defun remedybg-open-file() | |
(interactive) | |
(call-process-shell-command (format "%s open-file %s %d" remedybg-path buffer-file-name (line-number-at-pos)) nil 0) | |
) | |
(define-minor-mode remedybg-mode | |
"Control Remedybg from inside emacs" | |
:lighter "remeydbg" | |
:keymap | |
(list (cons [f9] 'remedybg-add-breakpoint-at-file) | |
(cons [f5] 'remedybg-start-debugging) | |
(cons [f10] 'remedybg-open-file) | |
) | |
) | |
(provide 'remedybg-mode) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment