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

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

[nongnu] elpa/lua-mode 2a8b58b 390/468: Silence byte-compiler


From: Philip Kaludercic
Subject: [nongnu] elpa/lua-mode 2a8b58b 390/468: Silence byte-compiler
Date: Thu, 5 Aug 2021 04:59:15 -0400 (EDT)

branch: elpa/lua-mode
commit 2a8b58bca8d9e0cee9f53f57bf722fc6777ded48
Author: Jonas Bernoulli <jonas@bernoul.li>
Commit: Jonas Bernoulli <jonas@bernoul.li>

    Silence byte-compiler
    
    * Check whether `rx-form' is `fboundp' before trying to use it.  On
      Emacs 27 it is not and while w only use it in a code-path that is
      not used on that Emacs version its byte-compiler still looks at it.
    
    * Do not sharp-quote `lua--new-rx-form' because otherwise the
      byte-compiler complains about it not being known to be defined,
      which is a false-positive.  In actuality that function is defined a
      few lines up.  The false-positive might be due to the definition and
      the use call being inside the same `eval-and-compile'.
---
 lua-mode.el | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/lua-mode.el b/lua-mode.el
index 1e8d434..6d682ce 100644
--- a/lua-mode.el
+++ b/lua-mode.el
@@ -184,11 +184,12 @@ element is itself expanded with `lua-rx-to-string'. "
         (setq form (if (eq 1 (length form))
                        (car form)
                      (append '(or) form)))
-        (rx-form `(seq symbol-start ,form symbol-end) rx-parent))
+       (and (fboundp 'rx-form) ; Silence Emacs 27's byte-compiler.
+             (rx-form `(seq symbol-start ,form symbol-end) rx-parent)))
 
       (setq lua-rx-constituents (copy-sequence rx-constituents))
 
-      (mapc #'lua--new-rx-form
+      (mapc 'lua--new-rx-form
             `((symbol lua--rx-symbol 1 nil)
               (ws . "[ \t]*") (ws+ . "[ \t]+")
               (lua-name :rx (symbol (regexp "[[:alpha:]_]+[[:alnum:]_]*")))



reply via email to

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