[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/evil-numbers 5622da311d 070/145: Cleanup: spelling, use fu
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/evil-numbers 5622da311d 070/145: Cleanup: spelling, use full sentences |
Date: |
Thu, 6 Jan 2022 03:00:19 -0500 (EST) |
branch: elpa/evil-numbers
commit 5622da311df599a44c98170dcb003188a17eb5cb
Author: Campbell Barton <ideasman42@gmail.com>
Commit: Campbell Barton <ideasman42@gmail.com>
Cleanup: spelling, use full sentences
---
evil-numbers.el | 39 +++++++++++++++++++--------------------
1 file changed, 19 insertions(+), 20 deletions(-)
diff --git a/evil-numbers.el b/evil-numbers.el
index 8aa9e1d01b..1bdec75dee 100644
--- a/evil-numbers.el
+++ b/evil-numbers.el
@@ -30,10 +30,10 @@
;;; Commentary:
-;; Increment / Decrement binary, octal, decimal and hex literals
+;; Increment / Decrement binary, octal, decimal and hex literals.
-;; works like C-a/C-x in vim, i.e. searches for number up to eol and then
-;; increments or decrements and keep zero padding up
+;; Works like C-a/C-x in vim, i.e. searches for number up to EOL and
+;; then increments or decrements and keep zero padding up.
;; Known Bugs:
;; See http://github.com/juliapath/evil-numbers/issues
@@ -147,11 +147,11 @@ number with a + sign."
(evil-with-restriction beg end
(while (re-search-forward
"\\(?:0\\(?:[Bb][01]+\\|[Oo][0-7]+\\|[Xx][0-9A-Fa-f]+\\)\\|[+-]?[0-9]+\\|[⁻⁺]?[⁰¹²³⁴⁵⁶⁷⁸⁹]\\|[₋₊]?[₀₁₂₃₄₅₆₇₈₉]\\)"
nil t)
;; Backward char, to cancel out the forward-char below. We
need
- ;; this, as re-search-forwards puts us behind the match.
+ ;; this, as `re-search-forwards' puts us behind the match.
(backward-char)
(evil-numbers/inc-at-pt (* amount count) nil nil nil)
(if incremental (setq count (+ count 1)))
- ;; Undo vim compatability.
+ ;; Undo VIM compatibility.
(forward-char 1)))))))))
(t (save-match-data
;; forward-char, so that we do not match the number directly behind
us.
@@ -188,22 +188,22 @@ number with a + sign."
(if signed "+" "")
(if padded len 0))
output))))
- ;; Moves point one position back to conform with Vim
+ ;; Moves point one position back to conform with VIM
(forward-char -1)
t))))
(or
- ;; find binary literals
+ ;; Find binary literals.
(evil-numbers/search-and-replace "0[bB][01]+" "01"
"\\([01]+\\)" amount 2)
- ;; find octal literals
+ ;; Find octal literals.
(evil-numbers/search-and-replace "0[oO][0-7]+" "01234567"
"\\([0-7]+\\)" amount 8)
- ;; find hex literals
+ ;; Find hex literals.
(evil-numbers/search-and-replace "0[xX][0-9a-fA-F]*"
"0123456789abcdefABCDEF"
"\\([0-9a-fA-F]+\\)" amount 16)
- ;; find superscript literals
+ ;; Find superscript literals.
(funcall
replace-with
(lambda (x)
@@ -214,7 +214,7 @@ number with a + sign."
(evil-numbers/swap-alist evil-numbers/superscript-alist)
x)))
- ;; find subscript literals
+ ;; Find subscript literals.
(funcall
replace-with
(lambda (x)
@@ -225,7 +225,7 @@ number with a + sign."
(evil-numbers/swap-alist evil-numbers/subscript-alist)
x)))
- ;; find normal decimal literals
+ ;; Find normal decimal literals.
(funcall replace-with (lambda (x) x) (lambda (x) x))
(error "No number at point or until end of line")))))))))
@@ -259,7 +259,7 @@ on."
(interactive "*<c><R>")
(evil-numbers/inc-at-pt (- (or amount 1)) beg end type 'incemental padded))
-;;; utils
+;;; Utilities.
(defun evil-numbers/search-number ()
"Return non-nil if a number literal at or after point.
@@ -272,7 +272,7 @@ octal: 0[oO][0-7]+, e.g. 0o42 or 0O5
hexadecimal 0[xX][0-9a-fA-F]+, e.g. 0xBEEF or 0Xcafe
decimal: [0-9]+, e.g. 42 or 23"
(or
- ;; numbers or format specifier in front
+ ;; Numbers or format specifier in front.
(looking-back (rx (or (+? digit)
(in "⁰¹²³⁴⁵⁶⁷⁸⁹")
(in "₀₁₂₃₄₅₆₇₈₉" )
@@ -280,17 +280,16 @@ decimal: [0-9]+, e.g. 42 or 23"
(and (in "oO") (*? (in "0-7")))
(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
+ ;; Search for number in rest of line match 0 of specifier or digit,
+ ;; being in a literal and after specifier is handled above.
(and
(re-search-forward "[[:digit:]⁰¹²³⁴⁵⁶⁷⁸⁹₀₁₂₃₄₅₆₇₈₉]" (point-at-eol) t)
(or
(not (memq (char-after) '(?b ?B ?o ?O ?x ?X)))
(/= (char-before) ?0)
- (and (> (point) 2) ; Should also take bofp
into consideration
+ (and (> (point) 2) ; Should also take bofp
into consideration.
(not (looking-back "\\W0" 2)))
- ;; skip format specifiers and interpret as bool
+ ;; Skip format specifiers and interpret as boolean.
(<= 0 (skip-chars-forward "bBoOxX"))))))
(defun evil-numbers/search-and-replace (look-back skip-back search-forward inc
base)
@@ -305,7 +304,7 @@ and return non-nil."
(replace-match (evil-numbers/format (+ inc (string-to-number (match-string
1) base))
(if evil-numbers/padDefault (length
(match-string 1)) 1)
base))
- ;; Moves point one position back to conform with Vim
+ ;; Moves point one position back to conform with VIM.
(forward-char -1)
t))
- [nongnu] elpa/evil-numbers d1b1f503a5 057/145: Autoload operators as interactive commands, (continued)
- [nongnu] elpa/evil-numbers d1b1f503a5 057/145: Autoload operators as interactive commands, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-numbers d988041c1f 056/145: List myself as maintainer, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-numbers c2cfdd1eb1 058/145: Merge pull request #6 from hlissner/patch-1, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-numbers 02de70f481 062/145: Quiet checkdoc warnings, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-numbers 6fa8e02e3b 073/145: Cleanup: avoid right shift, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-numbers 963e78cb44 069/145: Change repo URLs in Readme too, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-numbers 26ec2d4a52 066/145: Use lexical binding, remove unused function 'pad', ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-numbers a75c4b0a24 071/145: Cleanup: replace tabs with spaces, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-numbers 626ea72a21 084/145: Cleanup: add missing argument to doc-string, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-numbers 15dcea1be0 087/145: Fix #20 The cursor moves when increment/decrement fails, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-numbers 5622da311d 070/145: Cleanup: spelling, use full sentences,
ELPA Syncer <=
- [nongnu] elpa/evil-numbers ab6d436454 074/145: Cleanup: use '--' separator for private functions, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-numbers ff3bcf4efd 068/145: Change repo URLs, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-numbers 6483ab668b 103/145: Cleanup: use '?' instead of '*' for matching sign, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-numbers 43036127c1 105/145: Cleanup: line length < 80, spelling, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-numbers 0bbf3a8161 109/145: Cleanup: store unicode subscript/superscript in constants, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-numbers d09a0e676a 125/145: Fix #25 increment steps to the next line, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-numbers 08f0c1ee93 145/145: Cleanup: warnings for tests, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-numbers e1b60f3b75 133/145: Fix #27 Number directly before the cursor manipulated in some cases, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-numbers 3bd94723f8 134/145: Cleanup: indentation, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-numbers 0d66b63f42 116/145: CHANGELOG.org: update with recent fixes, ELPA Syncer, 2022/01/06