From 861d000d35f8ed90ed47ce7cff980157d1329408 Mon Sep 17 00:00:00 2001 From: Eric Abrahamsen Date: Sat, 10 Feb 2024 12:38:31 -0800 Subject: [PATCH] Don't compile after applying a patch, if compile command is nil * debbugs-gnu.el (debbugs-gnu-apply-patch): Allow the user to set debbugs-gnu-compile-command to nil to skip the compile step. --- debbugs-gnu.el | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/debbugs-gnu.el b/debbugs-gnu.el index a5453334cd..f4f1fce7da 100644 --- a/debbugs-gnu.el +++ b/debbugs-gnu.el @@ -2612,12 +2612,13 @@ If SELECTIVELY, query the user before applying the patch." (insert-file-contents-literally rej)) (goto-char (point-max)) (save-some-buffers t) - (require 'compile) - (mapc #'kill-process compilation-in-progress) - (compile - (format "cd %s; %s" - debbugs-gnu-current-directory - debbugs-gnu-compile-command)) + (when debbugs-gnu-compile-command + (require 'compile) + (mapc #'kill-process compilation-in-progress) + (compile + (format "cd %s; %s" + debbugs-gnu-current-directory + debbugs-gnu-compile-command))) (let (buf) (if (debbugs-gnu-apply-patch-prefers-magit) (progn @@ -2637,11 +2638,12 @@ If SELECTIVELY, query the user before applying the patch." (delete-other-windows) (switch-to-buffer output-buffer) (split-window) - (split-window) - (other-window 1) - (switch-to-buffer "*compilation*") - (goto-char (point-max)) - (other-window 1) + (when debbugs-gnu-compile-command + (split-window) + (other-window 1) + (switch-to-buffer "*compilation*") + (goto-char (point-max)) + (other-window 1)) (switch-to-buffer buf) (goto-char (point-min))))) -- 2.43.0