From b69e15b04f3095afb0247d2f2e787b6c60989bd6 Mon Sep 17 00:00:00 2001 From: Eshel Yaron Date: Sat, 19 Oct 2024 21:09:30 +0200 Subject: [PATCH] gud.el: Generate less unreachable code --- lisp/progmodes/gud.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lisp/progmodes/gud.el b/lisp/progmodes/gud.el index a4e611277e4..716b113c3c7 100644 --- a/lisp/progmodes/gud.el +++ b/lisp/progmodes/gud.el @@ -440,7 +440,9 @@ we're in the GUD buffer)." (defalias ',func (lambda (arg) ,@(if doc (list doc)) (interactive "p") - (if (or (not gud-running) (and ,async-ok gud-async-running)) + (if + ,(if (byte-compile-nilconstp async-ok) '(not gud-running) + `(or (not gud-running) (and ,async-ok gud-async-running))) ,(if (stringp cmd) `(gud-call ,cmd arg) ;; Unused lexical warning if cmd does not use "arg". -- 2.39.5