[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/evil-numbers e0f4ba3d13 004/145: Fix number search.
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/evil-numbers e0f4ba3d13 004/145: Fix number search. |
Date: |
Thu, 6 Jan 2022 03:00:13 -0500 (EST) |
branch: elpa/evil-numbers
commit e0f4ba3d135ddc87e3911bb2f1ae97ce033d2db4
Author: Michael Markert <markert.michael@googlemail.com>
Commit: Michael Markert <markert.michael@googlemail.com>
Fix number search.
Signed-off-by: Michael Markert <markert.michael@googlemail.com>
---
evil-numbers.el | 23 ++++++++++++-----------
1 file changed, 12 insertions(+), 11 deletions(-)
diff --git a/evil-numbers.el b/evil-numbers.el
index d679970654..17b29046c6 100644
--- a/evil-numbers.el
+++ b/evil-numbers.el
@@ -39,18 +39,19 @@
(save-match-data
(if (not (or
;; numbers or format specifier in front
- (looking-back (rx (or (+? digit)
- (and "0" (or (and (in "bB") (*? (in "01")))
- (and (in "oO") (*? (in
"0-7")))
- (and (in "xX") (*? (in
"0-9A-Fa-f"))))))))
+ (and
+ (looking-back (rx (or (+? digit)
+ (and "0" (or (and (in "bB") (*? (in
"01")))
+ (and (in "oO") (*? (in
"0-7")))
+ (and (in "xX") (*? (in digit
"A-Fa-f"))))))))
+ ;; being on a specifier is handled in progn
+ (not (looking-at "[bBoOxX]")))
;; search for number in rest of line
- (re-search-forward (rx
- (or
- (and "0" (in "bB") (+? (in "01")))
- (and "0" (in "oO") (+? (in "0-7")))
- (and "0" (in "xX") (+? (in digit "a-fA-F")))
- (or (and "0" (not (in "bBoOxX"))) (+?
digit))))
- (point-at-eol) t)))
+ (progn
+ ;; match 0 of specifier or digit, being in a literal and after
specifier is handled above
+ (re-search-forward "[[:digit:]]" (point-at-eol) t)
+ ;; skip format specifiers
+ (skip-chars-forward "bBoOxX"))))
(error "No number at point or until end of line")
(or
;; find binary literals
- [nongnu] elpa/evil-numbers 48b528baec 131/145: Refactor: instead of passing an amount, pass in a function, (continued)
- [nongnu] elpa/evil-numbers 48b528baec 131/145: Refactor: instead of passing an amount, pass in a function, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-numbers fd742943fd 127/145: README.org use definition lists for options, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-numbers cd23a7b458 136/145: README.org: update poor wording, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-numbers 9841266544 113/145: Cleanup: replace catch/throw with a 'found' variable, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-numbers 9cf802c29d 119/145: Fix #24 hexadecimal values case when incrementing/decrementing, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-numbers 6ea1c8c3a9 036/145: Use list for contributers., ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-numbers a2ce896e05 049/145: Update documentation, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-numbers ac4101f0e4 052/145: Explicitly require evil., ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-numbers 4fd2d402fe 050/145: Add CHANGELOG, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-numbers 8b59acf267 059/145: fix: handle hyphen-separated numbers correctly, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-numbers e0f4ba3d13 004/145: Fix number search.,
ELPA Syncer <=
- [nongnu] elpa/evil-numbers 221ceb6177 001/145: Initial commit., ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-numbers 7e7e2e42f3 005/145: Remove "support" for negative non-decimal literals., ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-numbers 4466368c6d 008/145: Adjust error messages., ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-numbers db0c5adc68 029/145: Add documentation the increment of region., ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-numbers d37c9812a1 024/145: Remove superflous but malicious check., ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-numbers 649c01ee4a 028/145: deactivate-mark when operating on region, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-numbers ecc51feda6 020/145: Fix glitches., ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-numbers 8ef07f7883 019/145: Prepare for elpa submission., ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-numbers caa4679814 031/145: Merge pull request #3 from mlf176f2/evil-numbers-in-region, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-numbers 2543f0bf35 016/145: Fix number search., ELPA Syncer, 2022/01/06