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

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

[nongnu] elpa/arduino-mode 7b94f5b 058/107: creating process with make-p


From: ELPA Syncer
Subject: [nongnu] elpa/arduino-mode 7b94f5b 058/107: creating process with make-process to use process sentinel to get notification.
Date: Sun, 29 Aug 2021 10:58:16 -0400 (EDT)

branch: elpa/arduino-mode
commit 7b94f5bd99339bc209d0a425f396e433240b821f
Author: stardiviner <numbchild@gmail.com>
Commit: stardiviner <numbchild@gmail.com>

    creating process with make-process to use process sentinel to get 
notification.
---
 arduino-mode.el | 32 +++++++++++++++++++++++++-------
 1 file changed, 25 insertions(+), 7 deletions(-)

diff --git a/arduino-mode.el b/arduino-mode.el
index f881ba0..0c3d242 100644
--- a/arduino-mode.el
+++ b/arduino-mode.el
@@ -4,7 +4,7 @@
 ;; Authors: Christopher Grim <christopher.grim@gmail.com>
 ;; Maintainer: stardiviner <numbchild@gmail.com>
 ;; Keywords: languages, arduino
-;; Package-Requires: ((emacs "24.4") (cl-lib "0.5"))
+;; Package-Requires: ((emacs "25") (cl-lib "0.5"))
 ;; Package-Version: 1.1
 ;; homepage: https://github.com/stardiviner/arduino-mode
 
@@ -182,20 +182,38 @@ Each list item should be a regexp matching a single 
identifier."
 (defun arduino-upload ()
   "Build and upload the sketch to an Arduino board."
   (interactive)
-  (start-file-process
-   "arduino-upload" "*arduino-upload*" arduino-executable "--upload" 
(buffer-file-name)))
+  (make-process
+   :command (list "arduino" "--upload" (buffer-file-name))
+   :name "arduino-upload"
+   :buffer "*arduino-upload*"
+   :sentinel (lambda (proc event)
+               (when (string= event "finished\n")
+                 (message "Arduino upload succeed.")))
+   ))
 
 (defun arduino-verify ()
   "Verify the sketch by building it."
   (interactive)
-  (start-file-process
-   "arduino-verify" "*arduino-verify*" arduino-executable "--verify" 
(buffer-file-name)))
+  (make-process
+   :command (list "arduino" "--verify" (buffer-file-name))
+   :name "arduino-verify"
+   :buffer "*arduino-verify*"
+   :sentinel (lambda (proc event)
+               (when (string= event "finished\n")
+                 (message "Arduino verify build succeed.")))
+   ))
 
 (defun arduino-open-with-arduino ()
   "Open the sketch with the Arduino IDE."
   (interactive)
-  (start-file-process
-   "arduino-open" "*arduino-open*" arduino-executable (buffer-file-name)))
+  (make-process
+   :command (list "arduino" (buffer-file-name))
+   :name "arduino-open"
+   :buffer "*arduino-open*"
+   :sentinel (lambda (proc event)
+               (when (string= event "finished\n")
+                 (message "Opened with Arduino succeed.")))
+   ))
 
 (defun arduino-install-boards (board)
   "Install `BOARD' support for Arduino."



reply via email to

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