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

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

[elpa] externals/beardbolt 609f781b3a 165/323: Fix usages of when-let


From: ELPA Syncer
Subject: [elpa] externals/beardbolt 609f781b3a 165/323: Fix usages of when-let
Date: Thu, 9 Mar 2023 10:58:27 -0500 (EST)

branch: externals/beardbolt
commit 609f781b3afbd4365c0a9691c5745c0c649ff2ad
Author: Jay Kamat <jaygkamat@gmail.com>
Commit: Jay Kamat <jaygkamat@gmail.com>

    Fix usages of when-let
    
    when-let was not defined in emacs25
---
 rmsbolt.el | 48 ++++++++++++++++++++++++------------------------
 1 file changed, 24 insertions(+), 24 deletions(-)

diff --git a/rmsbolt.el b/rmsbolt.el
index 4e693d52e3..404cc9ff7f 100644
--- a/rmsbolt.el
+++ b/rmsbolt.el
@@ -648,34 +648,34 @@ https://github.com/derickr/vld";
 ;;;;; Language Integrations
 (defun rmsbolt--parse-compile-commands (comp-cmds file)
   "Parse COMP-CMDS and extract a compilation dir and command for FILE."
-  (when-let* ((json-object-type 'alist)
-              (json-array-type 'vector)
-              (cmds (json-read-file comp-cmds))
-              (stripped-file (file-name-nondirectory file))
-              (entry (cl-find-if
-                      (lambda (elt)
-                        (string=
-                         stripped-file
-                         (file-name-nondirectory
-                          (alist-get 'file elt ""))))
-                      cmds))
-              (dir (alist-get 'directory entry))
-              (cmd (alist-get 'command entry)))
+  (when-let ((json-object-type 'alist)
+             (json-array-type 'vector)
+             (cmds (json-read-file comp-cmds))
+             (stripped-file (file-name-nondirectory file))
+             (entry (cl-find-if
+                     (lambda (elt)
+                       (string=
+                        stripped-file
+                        (file-name-nondirectory
+                         (alist-get 'file elt ""))))
+                     cmds))
+             (dir (alist-get 'directory entry))
+             (cmd (alist-get 'command entry)))
     (list dir cmd)))
 (defun rmsbolt--handle-c-compile-cmd (src-buffer)
   "Handle compile_commands.json for c/c++ for a given SRC-BUFFER.
 return t if successful."
-  (when-let* ((defaults (buffer-local-value 'rmsbolt--default-variables 
src-buffer))
-              (default-dir (cl-find 'rmsbolt-default-directory defaults))
-              (default-cmd (cl-find 'rmsbolt-command defaults))
-              (ccj "compile_commands.json")
-              (compile-cmd-file
-               (locate-dominating-file
-                (buffer-file-name src-buffer)
-                ccj))
-              (compile-cmd-file (expand-file-name ccj compile-cmd-file))
-              (to-ret (rmsbolt--parse-compile-commands
-                       compile-cmd-file (buffer-file-name src-buffer))))
+  (when-let ((defaults (buffer-local-value 'rmsbolt--default-variables 
src-buffer))
+             (default-dir (cl-find 'rmsbolt-default-directory defaults))
+             (default-cmd (cl-find 'rmsbolt-command defaults))
+             (ccj "compile_commands.json")
+             (compile-cmd-file
+              (locate-dominating-file
+               (buffer-file-name src-buffer)
+               ccj))
+             (compile-cmd-file (expand-file-name ccj compile-cmd-file))
+             (to-ret (rmsbolt--parse-compile-commands
+                      compile-cmd-file (buffer-file-name src-buffer))))
     (with-current-buffer src-buffer
       (setq-local rmsbolt-default-directory (cl-first to-ret))
       (setq-local rmsbolt-command



reply via email to

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