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

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

[nongnu] elpa/lua-mode 4db05e8 389/468: Use cl-lib instead of cl


From: Philip Kaludercic
Subject: [nongnu] elpa/lua-mode 4db05e8 389/468: Use cl-lib instead of cl
Date: Thu, 5 Aug 2021 04:59:15 -0400 (EDT)

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

    Use cl-lib instead of cl
    
    Emacs cl makes the latter obsolete.
    
    Since we stopped using `lexical-let*' in the previous commit all
    that is left to do is to use `cl-assert' instead of `assert'.
    
    To increase compatibility use `nth' instead of `caddr' et al., which
    depending on Emacs version and whether `cl' or `cl-lib' is loaded do
    or do not have to be spelled with the `cl-' prefix.
---
 lua-mode.el | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/lua-mode.el b/lua-mode.el
index 96b5f97..1e8d434 100644
--- a/lua-mode.el
+++ b/lua-mode.el
@@ -86,7 +86,7 @@
 
 ;;; Code:
 (eval-when-compile
-  (require 'cl))
+  (require 'cl-lib))
 
 (require 'comint)
 (require 'newcomment)
@@ -1043,12 +1043,12 @@ TOKEN-TYPE determines where the token occurs on a 
statement. open indicates that
   "Returns the relevant match regexp from token info"
   (cond
    ((eq direction 'forward) (cadr token-info))
-   ((eq direction 'backward) (caddr token-info))
+   ((eq direction 'backward) (nth 2 token-info))
    (t nil)))
 
 (defun lua-get-token-type (token-info)
   "Returns the relevant match regexp from token info"
-   (cadddr token-info))
+   (nth 3 token-info))
 
 (defun lua-backwards-to-block-begin-or-end ()
   "Move backwards to nearest block begin or end.  Returns nil if not 
successful."
@@ -1896,7 +1896,7 @@ left out."
   "Forward to block end"
   (interactive "p")
   ;; negative offsets not supported
-  (assert (or (not count) (>= count 0)))
+  (cl-assert (or (not count) (>= count 0)))
   (save-match-data
     (let ((count (or count 1))
           (block-start (mapcar 'car lua-sexp-alist)))



reply via email to

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