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

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

[nongnu] elpa/arduino-mode 3cc39d9 013/107: Add bindings for arduino-upl


From: ELPA Syncer
Subject: [nongnu] elpa/arduino-mode 3cc39d9 013/107: Add bindings for arduino-upload.
Date: Sun, 29 Aug 2021 10:58:07 -0400 (EDT)

branch: elpa/arduino-mode
commit 3cc39d9a20810813e309c2cfd7a95f5ab3d5f914
Author: Peter Oliver <git@mavit.org.uk>
Commit: Peter Oliver <git@mavit.org.uk>

    Add bindings for arduino-upload.
---
 arduino-mode.el | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/arduino-mode.el b/arduino-mode.el
index 42e2eb4..a51a6be 100644
--- a/arduino-mode.el
+++ b/arduino-mode.el
@@ -106,10 +106,20 @@ Each list item should be a regexp matching a single 
identifier." :group 'arduino
                       ;; Add bindings which are only useful for Arduino
                       map)
   "Keymap used in arduino-mode buffers.")
+(define-key arduino-mode-map "\C-cg"  'arduino-upload)
 
 (easy-menu-define arduino-menu arduino-mode-map "Arduino Mode Commands"
                   (cons "Arduino" (c-lang-const c-mode-menu arduino)))
 
+; How does one add this directly to the Arduino menu in XEmacs?
+(if (string-match "XEmacs" emacs-version)
+    (easy-menu-add-item arduino-menu
+                       (list "Micro-controller") ["Upload" arduino-upload t])
+  (easy-menu-add-item arduino-menu
+                     nil ["----" nil nil])
+  (easy-menu-add-item arduino-menu
+                     nil ["Upload" arduino-upload t]))
+
 (defcustom arduino-makefile-name "Makefile"
   "Name of Makefile used to compile and upload Arduino sketches."
   :type 'string
@@ -170,7 +180,7 @@ Key bindings:
         local-abbrev-table arduino-mode-abbrev-table
         abbrev-mode t
         imenu-generic-expression cc-imenu-c-generic-expression)
-  (use-local-map c-mode-map)
+  (use-local-map arduino-mode-map)
   ;; `c-init-language-vars' is a macro that is expanded at compile
   ;; time to a large `setq' with all the language variables and their
   ;; customized values for our language.



reply via email to

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