summaryrefslogtreecommitdiff
path: root/bin/emacsclient
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2022-10-26 17:03:46 -0700
committerSean Whitton <spwhitton@spwhitton.name>2022-10-29 21:47:37 -0700
commit76950925a36c7f4dbccad52ff7ef5b489e3ac222 (patch)
treec356280b29f461cedf75fc994eb52f80929ec38b /bin/emacsclient
parente8f0e82c70d57653ddd1cb6fa89a710ab024ac7f (diff)
downloaddotfiles-76950925a36c7f4dbccad52ff7ef5b489e3ac222.tar.gz
emacsclient wrapper: use gdb-wait-for-pending when detaching gdbmacs
Diffstat (limited to 'bin/emacsclient')
-rwxr-xr-xbin/emacsclient8
1 files changed, 6 insertions, 2 deletions
diff --git a/bin/emacsclient b/bin/emacsclient
index ed1c2215..2b818e04 100755
--- a/bin/emacsclient
+++ b/bin/emacsclient
@@ -125,8 +125,12 @@ if [ -z "$daemon_name" ] && $devel_running && $want_installed; then
# gdb so that `spw/gdbmacs-attach' doesn't look at `gdb-inferior-status'.
[ -n "${gdbmacs:=$(get_listener ${socket_dir}gdbmacs)}" ] \
&& "$installed_emacsclient" -sgdbmacs \
- --eval '(gud-basic-call "detach")' \
- --eval '(gud-basic-call "quit")'
+ --eval '(gdb-wait-for-pending
+ (lambda ()
+ (gud-basic-call "detach")
+ (gdb-wait-for-pending
+ (lambda ()
+ (gud-basic-call "quit")))))'
wait $inotifywait
devel_running=false