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

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

[nongnu] elpa/lua-mode ed01d35 071/468: Implement proper syntax-status q


From: Philip Kaludercic
Subject: [nongnu] elpa/lua-mode ed01d35 071/468: Implement proper syntax-status querying: improve precision a lot
Date: Thu, 5 Aug 2021 04:58:10 -0400 (EDT)

branch: elpa/lua-mode
commit ed01d351c81c18f6d2d4d67dac416ee720946e62
Author: immerrr <immerrr@gmail.com>
Commit: immerrr <immerrr@gmail.com>

    Implement proper syntax-status querying: improve precision a lot
---
 lua-mode.el | 11 +++--------
 1 file changed, 3 insertions(+), 8 deletions(-)

diff --git a/lua-mode.el b/lua-mode.el
index 834f737..d2d1831 100644
--- a/lua-mode.el
+++ b/lua-mode.el
@@ -404,22 +404,17 @@ This function replaces previous prefix-key binding with a 
new one."
   (lua--customize-set-prefix-key 'lua-prefix-key new-key-str)
   (lua-prefix-key-update-bindings))
 
-(defun lua-syntax-status ()
-  "Returns the syntactic status of the character after the point."
-  (parse-partial-sexp (line-beginning-position) (point)))
-
-
 (defun lua-string-p ()
   "Returns true if the point is in a string."
-  (elt (lua-syntax-status) 3))
+  (elt (syntax-ppss) 3))
 
 (defun lua-comment-p ()
   "Returns true if the point is in a comment."
-  (elt (lua-syntax-status) 4))
+  (elt (syntax-ppss) 4))
 
 (defun lua-comment-or-string-p ()
   "Returns true if the point is in a comment or string."
-  (let ((parse-result (lua-syntax-status)))
+  (let ((parse-result (syntax-ppss)))
     (or (elt parse-result 3) (elt parse-result 4))))
 
 (defun lua-indent-line ()



reply via email to

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