[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/dape 0a7eaa8f6f 3/3: Fix dape-compile-hook
From: |
ELPA Syncer |
Subject: |
[elpa] externals/dape 0a7eaa8f6f 3/3: Fix dape-compile-hook |
Date: |
Tue, 10 Dec 2024 15:57:47 -0500 (EST) |
branch: externals/dape
commit 0a7eaa8f6f672598abe622f5d7079e9a7e03d384
Author: Daniel Pettersson <daniel@dpettersson.net>
Commit: Daniel Pettersson <daniel@dpettersson.net>
Fix dape-compile-hook
---
dape.el | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/dape.el b/dape.el
index 323bd3d34f..ec29cc4a28 100644
--- a/dape.el
+++ b/dape.el
@@ -720,7 +720,8 @@ project's root. See `dape--default-cwd'."
(defcustom dape-compile-hook nil
"Called after dape compilation finishes.
-The hook is run with one argument, the compilation buffer."
+The hook is run with one argument, the compilation buffer when
+compilation is successful."
:type 'hook)
(defcustom dape-minibuffer-hint-ignore-properties
@@ -2748,9 +2749,10 @@ For more information see `dape-configs'."
"Hook for `dape--compile-compilation-finish'.
Using BUFFER and STR."
(remove-hook 'compilation-finish-functions
#'dape--compile-compilation-finish)
- (cond ((equal "finished\n" str) (funcall dape--compile-after-fn))
- (t (dape--message "Compilation failed %s" (string-trim-right str))))
- (run-hook-with-args 'dape-compile-hook buffer))
+ (if (equal "finished\n" str)
+ (progn (funcall dape--compile-after-fn)
+ (run-hook-with-args 'dape-compile-hook buffer))
+ (dape--message "Compilation failed %s" (string-trim-right str))))
(defun dape--compile (config fn)
"Start compilation for CONFIG then call FN."