diff options
author | Sean Whitton <spwhitton@spwhitton.name> | 2022-10-27 10:05:11 -0700 |
---|---|---|
committer | Sean Whitton <spwhitton@spwhitton.name> | 2022-10-29 21:47:37 -0700 |
commit | 15b17cec79d8141bcd43741efdd3e203b3a3cde4 (patch) | |
tree | 3c1e633e3d91fede51abe091458f0314f16afbf1 | |
parent | 76950925a36c7f4dbccad52ff7ef5b489e3ac222 (diff) | |
download | dotfiles-15b17cec79d8141bcd43741efdd3e203b3a3cde4.tar.gz |
spw/gdbmacs-attach: simplify beginning of function slightly
-rw-r--r-- | .emacs.d/init.el | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/.emacs.d/init.el b/.emacs.d/init.el index 49b29902..dbe06590 100644 --- a/.emacs.d/init.el +++ b/.emacs.d/init.el @@ -2287,14 +2287,13 @@ Called by '~/src/dotfiles/bin/emacsclient --spw/update-environment'." (defvar-local spw/gdbmacs-target-name nil) (defun spw/gdbmacs-attach (&optional name) + (require 'gdb-mi) (let (pid (arg (if name (concat "--fg-daemon=" name) "--fg-daemon")) - (proc (and (boundp 'gud-comint-buffer) - (get-buffer-process gud-comint-buffer)))) + (proc (get-buffer-process gud-comint-buffer))) (when (and proc (string= gdb-inferior-status "signal-received")) ;; Avoid wiping out useful info. (error "Possibly Emacs just crashed; not attaching for now")) - (require 'gdb-mi) (cl-flet ((run-or-continue () (gdb-wait-for-pending (lambda () |