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

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

[nongnu] elpa/evil-numbers 4308935a03 061/145: Resolve looking-back warn


From: ELPA Syncer
Subject: [nongnu] elpa/evil-numbers 4308935a03 061/145: Resolve looking-back warnings
Date: Thu, 6 Jan 2022 03:00:19 -0500 (EST)

branch: elpa/evil-numbers
commit 4308935a03f58cfa9bcdeeca9b4246fd03b887d8
Author: Campbell Barton <ideasman42@gmail.com>
Commit: GitHub <noreply@github.com>

    Resolve looking-back warnings
    
    Resolve Warning: looking-back called with 1 argument, but requires 2-3.
---
 evil-numbers.el | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/evil-numbers.el b/evil-numbers.el
index 76a52a27d3..334931ad8a 100644
--- a/evil-numbers.el
+++ b/evil-numbers.el
@@ -284,7 +284,8 @@ decimal: [0-9]+, e.g. 42 or 23"
                          (in "₀₁₂₃₄₅₆₇₈₉" )
                          (and "0" (or (and (in "bB") (*? (in "01")))
                                       (and (in "oO") (*? (in "0-7")))
-                                      (and (in "xX") (*? (in digit 
"A-Fa-f"))))))))
+                                      (and (in "xX") (*? (in digit 
"A-Fa-f")))))))
+                 (point-at-bol))
    ;; search for number in rest of line
    ;; match 0 of specifier or digit, being in a literal and after specifier is
    ;; handled above
@@ -300,7 +301,7 @@ decimal: [0-9]+, e.g. 42 or 23"
 
 (defun evil-numbers/search-and-replace (look-back skip-back search-forward inc 
base)
   "When looking back at LOOK-BACK skip chars SKIP-BACK backwards and replace 
number incremented by INC in BASE and return non-nil."
-  (when (looking-back look-back)
+  (when (looking-back look-back (point-at-bol))
     (skip-chars-backward skip-back)
     (search-forward-regexp search-forward)
     (replace-match (evil-numbers/format (+ inc (string-to-number (match-string 
1) base))



reply via email to

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