below are my set up for launching gdb in Emacs.
(defun debug-gdb-advanced () (interactive) (delete-other-windows) ; close all other panes (split-window-horizontally) ; split pane left right (other-window 1) ; switch to right pane (split-window-vertically) ; split pane top down (debug-gdb) ; open (set-window-dedicated-p (selected-window) t) ; anchor the gdb window, never let it switch buffer (other-window 2) ; switch to left pane (gdb-display-stack-buffer) ; open stack buffer (other-window 1)) ; switch to gdb pane
but I also want to run the following after gdb has initialized
(defun closeUnnecessaryBuffers () (interactive) (setq kill-buffer-query-functions nil) (kill-buffer (shell "*breakpoints of *")) (kill-buffer (shell "*threads of *")) (kill-buffer (shell "input/output of*")))
is there a way to fold the second function into the first one without mannually waiting gdb fully initialized.