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

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

[nongnu] elpa/arduino-mode 3cd6585 003/107: highlight builtin functions


From: ELPA Syncer
Subject: [nongnu] elpa/arduino-mode 3cd6585 003/107: highlight builtin functions as keywords
Date: Sun, 29 Aug 2021 10:58:06 -0400 (EDT)

branch: elpa/arduino-mode
commit 3cd65855e043f0fda0faf53e4e56a218bc9f2d82
Author: Christopher Grim <christopher.grim@gmail.com>
Commit: Christopher Grim <christopher.grim@gmail.com>

    highlight builtin functions as keywords
    
    All builtin functions from the extended language reference[1] will be
    highlighted as keywords.
    
    [1] <http://arduino.cc/en/Reference/Extended>
---
 arduino-mode.el | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/arduino-mode.el b/arduino-mode.el
index b71a610..13f83a3 100644
--- a/arduino-mode.el
+++ b/arduino-mode.el
@@ -47,6 +47,18 @@
   arduino (append '("HIGH" "LOW" "INPUT" "OUTPUT")
                   (c-lang-const c-constant-kwds)))
 
+(c-lang-defconst c-simple-stmt-kwds
+  arduino (append '("pinMode" "digitalWrite" "digitalRead"                     
 ; Digital I/O
+                    "analogRead" "analogWrite"                                 
 ; Analog I/O
+                    "shiftOut" "pulseIn"                                       
 ; Advanced I/O
+                    "millis" "delay" "delayMicroseconds"                       
 ; Time
+                    "min" "max" "abs" "constrain" "map" "pow" "sq" "sqrt" 
"sin" ; Math
+                    "sin" "cos" "tan"                                          
 ; Trigonometry
+                    "randomSeed" "random"                                      
 ; Random Numbers
+                    "attachInterrupt" "detachInterrupt"                        
 ; External Interrupts
+                    "interrupts" "noInterrupts")                               
 ; Interrupts
+                  (c-lang-const c-simple-stmt-kwds)))
+
 (defgroup arduino nil "Arduino mode customizations")
 
 (defcustom arduino-font-lock-extra-types nil



reply via email to

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