emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/detached 2354682802 3/3: Don't trample compilation-buff


From: ELPA Syncer
Subject: [elpa] externals/detached 2354682802 3/3: Don't trample compilation-buffer-name-function.
Date: Tue, 25 Oct 2022 10:57:35 -0400 (EDT)

branch: externals/detached
commit 235468280221d48cd2841b9f2e944b6d760c2e12
Author: Greg Pfeil <greg@technomadic.org>
Commit: Niklas Eklund <niklas.eklund@posteo.net>

    Don't trample compilation-buffer-name-function.
    
    The default function should produce the name `*detached-compilation*`, 
which is
    exactly what was previously hardcoded, but it’s important to let it through 
in
    other cases. E.g., Projectile provides a function that produces distinct 
buffer
    names per project, so multiple compilation buffers can exist at once, like
    `*detached-compilation*<detached.el>` and 
`*detached-compilation*<my-project>`.
---
 detached-compile.el | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)

diff --git a/detached-compile.el b/detached-compile.el
index 745fc1fc40..eaf51ea8a7 100644
--- a/detached-compile.el
+++ b/detached-compile.el
@@ -109,15 +109,13 @@ Optionally EDIT-COMMAND."
 (defun detached-compile--compilation-start (compilation-start &rest args)
   "Create a `detached' session before running COMPILATION-START with ARGS."
   (if detached-enabled
-      (pcase-let ((`(,_command ,mode ,_name_function ,highlight-regexp) args)
-                  (buffer-name "*detached-compilation*"))
+      (pcase-let ((`(,_command ,mode ,name-function ,highlight-regexp) args))
         (if (eq detached-session-mode 'create)
             (detached-start-detached-session detached--current-session)
-          (cl-letf* ((name-function (lambda (_) buffer-name)))
-            (apply compilation-start `(,(detached--shell-command 
detached--current-session t)
-                                       ,(or mode 'detached-compilation-mode)
-                                       ,name-function
-                                       ,highlight-regexp)))))
+          (apply compilation-start `(,(detached--shell-command 
detached--current-session t)
+                                     ,(or mode 'detached-compilation-mode)
+                                     ,name-function
+                                     ,highlight-regexp))))
     (apply compilation-start args)))
 
 (defun detached-compile--replace-modesetter ()



reply via email to

[Prev in Thread] Current Thread [Next in Thread]