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

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

[elpa] externals/gtags-mode 053184f8b5 14/61: Don't call with-connection


From: ELPA Syncer
Subject: [elpa] externals/gtags-mode 053184f8b5 14/61: Don't call with-connection-local-variables
Date: Thu, 28 Apr 2022 10:57:38 -0400 (EDT)

branch: externals/gtags-mode
commit 053184f8b5dc9afdf612b3f00fc334210263575a
Author: Jimmy Aguilar Mena <kratsbinovish@gmail.com>
Commit: Jimmy Aguilar Mena <kratsbinovish@gmail.com>

    Don't call with-connection-local-variables
    
    With the new changes in the code it is not needed.
---
 global-xref.el | 34 ++++++++++++++++------------------
 1 file changed, 16 insertions(+), 18 deletions(-)

diff --git a/global-xref.el b/global-xref.el
index 0feba4043f..8e3498ad86 100644
--- a/global-xref.el
+++ b/global-xref.el
@@ -115,14 +115,13 @@ Starts an asynchronous process and sets
 `global-xref--exec-async-sentinel' as the process sentinel if
 SENTINEL is 'nil' or not specified.  Returns the process
 handler."
-  (with-connection-local-variables
-   (when-let* ((cmd (symbol-value command))
-              (process (apply #'start-file-process
-                              (format "%s-async" cmd)
-                              (generate-new-buffer " *temp*" t) cmd args))
-              (sentinel (or sentinel #'global-xref--exec-async-sentinel)))
-     (set-process-sentinel process sentinel)
-     process)))
+  (when-let* ((cmd (symbol-value command))
+             (process (apply #'start-file-process
+                             (format "%s-async" cmd)
+                             (generate-new-buffer " *temp*" t) cmd args))
+             (sentinel (or sentinel #'global-xref--exec-async-sentinel)))
+    (set-process-sentinel process sentinel)
+    process))
 
 ;; Sync functions
 (defun global-xref--sync-sentinel ()
@@ -144,16 +143,15 @@ Starts a sync process; on success call SENTINEL or
 `global-xref--sync-sentinel' if SENTINEL is not specified or
 'nil'.  Returns the output of SENTINEL or nil if any error
 occurred."
-  (with-connection-local-variables
-   (when-let ((cmd (symbol-value command))
-             (sentinel (or sentinel #'global-xref--sync-sentinel)))
-     (with-temp-buffer ;; When sync
-       (let ((status (apply #'process-file cmd nil (current-buffer) nil args)))
-        (if (eq status 0)
-            (funcall sentinel)
-          (message "global error output:\n%s" (buffer-string))
-          (error "Sync %s %s: exited abnormally with code %s" cmd args status)
-          nil))))))
+  (when-let ((cmd (symbol-value command))
+            (sentinel (or sentinel #'global-xref--sync-sentinel)))
+    (with-temp-buffer ;; When sync
+      (let ((status (apply #'process-file cmd nil (current-buffer) nil args)))
+       (if (eq status 0)
+           (funcall sentinel)
+         (message "global error output:\n%s" (buffer-string))
+         (error "Sync %s %s: exited abnormally with code %s" cmd args status)
+         nil)))))
 
 ;; Api functions
 (defun global-xref--find-root ()



reply via email to

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