diff options
author | Yuchen Pei <id@ypei.org> | 2025-01-25 09:37:05 +1100 |
---|---|---|
committer | Yuchen Pei <id@ypei.org> | 2025-01-25 09:37:05 +1100 |
commit | 09e66cf0e799fa0f66d589a66443e7481327947f (patch) | |
tree | 2dd70137701dcd9b80652f79f2627b98162120a0 /emacs/.emacs.d/lisp/my | |
parent | d517e2b4b6f036f1d38142c4adc80d229404fc4c (diff) |
Diffstat (limited to 'emacs/.emacs.d/lisp/my')
-rw-r--r-- | emacs/.emacs.d/lisp/my/my-mariadb.el | 10 | ||||
-rw-r--r-- | emacs/.emacs.d/lisp/my/my-prog.el | 13 |
2 files changed, 18 insertions, 5 deletions
diff --git a/emacs/.emacs.d/lisp/my/my-mariadb.el b/emacs/.emacs.d/lisp/my/my-mariadb.el index d790944..d6c2463 100644 --- a/emacs/.emacs.d/lisp/my/my-mariadb.el +++ b/emacs/.emacs.d/lisp/my/my-mariadb.el @@ -33,7 +33,9 @@ (interactive) (if (equal (file-name-extension (buffer-file-name)) "test") - (call-interactively 'project-compile) + (progn + (my-mtr-set-compile-command) + (call-interactively 'compile)) (sql-send-buffer))) (defun my-gdb-maria () @@ -311,7 +313,11 @@ switches to the buffer." (match-string 3 buffer-file-name)))))) (setq-local compile-command - (format "%smysql-test/mtr %s" build-dir test-name))))) + (format "%s %s %s %s" + "taskset -c 0-3" + (file-name-concat build-dir "mysql-test/mtr") + test-name + "--rr"))))) (provide 'my-mariadb) ;;; my-mariadb.el ends here diff --git a/emacs/.emacs.d/lisp/my/my-prog.el b/emacs/.emacs.d/lisp/my/my-prog.el index faf20b6..92fcf21 100644 --- a/emacs/.emacs.d/lisp/my/my-prog.el +++ b/emacs/.emacs.d/lisp/my/my-prog.el @@ -442,6 +442,11 @@ overlay arrow in source buffer." ;; (accept-process-output (get-buffer-process gud-comint-buffer) .1))) ;; (gud-gdb-completions-1 gud-gdb-fetched-lines))) +(defun my-gud-watch-expr (expr) + (with-current-buffer gud-comint-buffer + (insert "watch -l " expr) + (comint-send-input))) + (defun my-gud-print-expr (expr) (with-current-buffer gud-comint-buffer (insert "p " expr) @@ -449,9 +454,11 @@ overlay arrow in source buffer." (defun my-gud-print-expr-region (b e) (interactive "r") - (if (eq (gdb-get-source-buffer) (current-buffer)) - (my-gud-print-expr (buffer-substring b e)) - (error "Not in the source buffer"))) + (unless (eq (gdb-get-source-buffer) (current-buffer)) + (error "Not in the source buffer")) + (if current-prefix-arg + (my-gud-watch-expr (buffer-substring b e)) + (my-gud-print-expr (buffer-substring b e)))) ;;; which-func (defun my-copy-which-func () |