branch: elpa/typst-ts-mode
commit 919b08899789a8c5b0e3d36e660285a10526cdb4
Author: meowking <mr.meowk...@posteo.com>
Commit: meowking <mr.meowk...@posteo.com>

    chore
---
 typst-ts-editing.el | 22 ++++++++--------------
 typst-ts-mode.el    |  2 +-
 2 files changed, 9 insertions(+), 15 deletions(-)

diff --git a/typst-ts-editing.el b/typst-ts-editing.el
index 03ba96ec78..aa03c5a369 100644
--- a/typst-ts-editing.el
+++ b/typst-ts-editing.el
@@ -25,6 +25,7 @@
 (require 'outline)
 (require 'typst-ts-core)
 (require 'typst-ts-variables)
+(require 'typst-ts-symbols)
 (require 'seq)
 
 (defun typst-ts-mode-heading-up ()
@@ -625,23 +626,16 @@ When there is no section it will insert a heading below 
point."
   "Calculate fill prefix."
   ;; see `do-auto-fill' function and `;; Choose a fill-prefix automatically.'
   ;; for default automatical fill-prefix finding algorithm
-  (let ((fill-prefix nil))
+  (let (fill-prefix)
     (setq
      fill-prefix
      (catch 'fill-prefix
-       (let* ((cur-pos (point))
-              (cur-node (treesit-node-at cur-pos))
-              (cur-node-type (treesit-node-type cur-node))
-              (parent-node (treesit-node-parent cur-node))  ; could be nil
-              (parent-node-type (treesit-node-type parent-node))
-              node)
-         (cond
-          ;; for condition that there are closely aligned line above
-          ((setq node (typst-ts-core-parent-util-type
-                       (typst-ts-core-get-parent-of-node-at-bol-nonwhite)
-                       "item" t t))
-           (throw 'fill-prefix (fill-context-prefix (line-beginning-position) 
(line-end-position)))))
-         )))
+       (cond
+        ;; for condition that there are closely aligned line above
+        ((typst-ts-core-parent-util-type
+          (typst-ts-core-get-parent-of-node-at-bol-nonwhite)
+          "item" t t)
+         (throw 'fill-prefix (fill-context-prefix (line-beginning-position) 
(line-end-position)))))))
     fill-prefix))
 
 (defun typst-ts-editing-auto-fill-function ()
diff --git a/typst-ts-mode.el b/typst-ts-mode.el
index 8508738451..6e1ac85dbb 100644
--- a/typst-ts-mode.el
+++ b/typst-ts-mode.el
@@ -223,7 +223,7 @@ If you want to enable/disable specific font lock feature, 
please change
       (setq beg next))))
 
 
-(defun typst-ts-mode-render-math-scripts-fn (node override start end)
+(defun typst-ts-mode-render-math-scripts-fn (node _override _start _end)
   (let* ((ns (treesit-node-start node))
          (ne (treesit-node-end node))
          (prev-node-text (treesit-node-text (treesit-node-prev-sibling node)))

Reply via email to