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

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

[nongnu] elpa/evil-matchit 41a062bb88: more logging code. support javasc


From: ELPA Syncer
Subject: [nongnu] elpa/evil-matchit 41a062bb88: more logging code. support javascript statement without semicolons
Date: Sat, 24 Jun 2023 04:00:19 -0400 (EDT)

branch: elpa/evil-matchit
commit 41a062bb88bde5aa3dc3ddab0ad5353e9bbc3f56
Author: Chen Bin <chenbin.sh@gmail.com>
Commit: Chen Bin <chenbin.sh@gmail.com>

    more logging code. support javascript statement without semicolons
---
 evil-matchit-javascript.el | 15 ++++++++++++---
 evil-matchit.el            | 12 +++++-------
 pkg.sh                     |  2 +-
 3 files changed, 18 insertions(+), 11 deletions(-)

diff --git a/evil-matchit-javascript.el b/evil-matchit-javascript.el
index 004a265e39..b84d7c6086 100644
--- a/evil-matchit-javascript.el
+++ b/evil-matchit-javascript.el
@@ -32,7 +32,7 @@
 ;; should try next howto, the purpose is avoid missing any howto
 (defvar evilmi-javascript-extract-keyword-howtos
   '(("const .* *= *\\(styled\\)[^`]*` *$" 1) ; styled component
-    ("^[ \t]*\\(`\\); *$" 1)))
+    ("^[ \t]*\\(`\\);? *$" 1)))
 
 (defvar evilmi-javascript-match-tags
   '((("styled") () "`")))
@@ -67,24 +67,33 @@
 (defun evilmi-javascript-get-tag ()
   "Get tag at point."
   ;; only handle open tag
+  (when evilmi-debug
+    (message "evilmi-javascript-get-tag called"))
   (let* (rlt)
     (cond
      ;; bracket
      ((memq (following-char)
             evilmi-javascript-matching-chars)
+      (when evilmi-debug
+        (message "evilmi-javascript-get-tag. following char=%s is in 
`evilmi-javascript-matching-chars'"
+                 (following-char)))
       (setq rlt (list (point))))
 
      ;; use defined tag
      ((setq rlt (evilmi-sdk-get-tag evilmi-javascript-match-tags
                                     evilmi-javascript-extract-keyword-howtos))
-      ;; do nothing
-      )
+
+      (when evilmi-debug
+        (message "evilmi-javascript-get-tag. current line has tag=%s in 
`evilmi-javascript-extract-keyword-howtos'"
+                 rlt)))
 
      ;; other javascript statements containing brackets
      (t
       (let* ((r (evilmi--javascript-find-open-brace (evilmi-sdk-curline)))
              (p (line-beginning-position)))
         (when r
+          (when evilmi-debug
+            (message "evilmi-javascript-get-tag. open brace=%s" r))
           (forward-line (1- (car r)))
           (search-forward (cadr r) nil nil)
           (backward-char)
diff --git a/evil-matchit.el b/evil-matchit.el
index b16ce1772c..cc30f3515e 100644
--- a/evil-matchit.el
+++ b/evil-matchit.el
@@ -4,7 +4,7 @@
 
 ;; Author: Chen Bin <chenbin.sh@gmail.com>
 ;; URL: http://github.com/redguardtoo/evil-matchit
-;; Version: 3.0.0
+;; Version: 3.0.1
 ;; Keywords: matchit vim evil
 ;; Package-Requires: ((emacs "25.1"))
 ;;
@@ -95,7 +95,7 @@ Some modes can be toggle on/off in the hook"
 (defun evilmi-jump-items-internal (num &optional func)
   "Jump between items NUM times and apply function FUNC."
   (when evilmi-debug
-    (message "evilmi-jump-items-internal called => %s (point)=%d" num (point)))
+    (message "evilmi-jump-items-internal called => %s (point)=%d func=%s" num 
(point) func))
   (let* ((jump-rules (plist-get evilmi-plugins major-mode))
          rlt
          jumped
@@ -123,7 +123,7 @@ Some modes can be toggle on/off in the hook"
           (setq ideal-dest (funcall (nth 1 rule) rlt num))
           ;; jump only once if the jump is successful
           (setq jumped t))
-        (when evilmi-debug
+        (when (and evilmi-debug rlt)
           (message "rlt=%s rule=%s p=%s jumped=%s idea-dest=%s"
                    rlt
                    rule
@@ -137,9 +137,7 @@ Some modes can be toggle on/off in the hook"
       (evilmi-sdk-simple-jump)
       (setq ideal-dest (point)))
 
-    (if evilmi-debug (message "evilmi-jump-items-internal called. Return: %s" 
ideal-dest))
-
-    (run-hook-with-args 'evilmi-jump-hook nil)
+    (if evilmi-debug (message "evilmi-jump-items-internal returned: %s" 
ideal-dest))
     ideal-dest))
 
 ;;;###autoload
@@ -327,7 +325,7 @@ If IS-INNER is t, the region is inner text object."
 (defun evilmi-version()
   "Print version."
   (interactive)
-  (message "3.0.0"))
+  (message "3.0.1"))
 
 ;; initialize evilmi-plugins only once
 (evilmi-init-plugins)
diff --git a/pkg.sh b/pkg.sh
index 49821b97f1..6e7ece5eae 100755
--- a/pkg.sh
+++ b/pkg.sh
@@ -1,6 +1,6 @@
 #!/bin/bash
 name=evil-matchit
-version=3.0.0
+version=3.0.1
 pkg=$name-$version
 mkdir $pkg
 cp README.org $pkg



reply via email to

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