[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/evil-nerd-commenter b9e34fe377 088/235: Prompt user for in
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/evil-nerd-commenter b9e34fe377 088/235: Prompt user for input and fix evilnc-kill-to-line |
Date: |
Thu, 6 Jan 2022 02:59:37 -0500 (EST) |
branch: elpa/evil-nerd-commenter
commit b9e34fe3777dbb9f3489ebec8521d1a7268c398f
Author: Tu, Do <tuhdo1710@gmail.com>
Commit: Tu, Do <tuhdo1710@gmail.com>
Prompt user for input and fix evilnc-kill-to-line
Prompt user input for following commands:
- evilnc-comment-or-uncomment-to-the-line
- evilnc-copy-to-line
- evilnc-copy-and-comment-lines
- evilnc-kill-to-line
Also fix evilnc-kill-to-the-line error when the extra newline at end of
file does not exist. For example, if line 8 is the last line and no
newline at the end, then kill to line 8 causes this error like this:
Args out of range: #<buffer *scratch*>, 192, 212
---
evil-nerd-commenter.el | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/evil-nerd-commenter.el b/evil-nerd-commenter.el
index 8e6dfd9abb..43e8523c44 100644
--- a/evil-nerd-commenter.el
+++ b/evil-nerd-commenter.el
@@ -341,7 +341,7 @@ Paragraphs are separated by empty lines."
;;;###autoload
(defun evilnc-comment-or-uncomment-to-the-line (&optional LINENUM)
"Comment or uncomment from the current line to the LINENUM line"
- (interactive "p")
+ (interactive "nLine: ")
(if (not (region-active-p))
(let ((b (line-beginning-position))
(e (line-end-position)))
@@ -417,7 +417,7 @@ or 'C-u 3 M-x
evilnc-quick-comment-or-uncomment-to-the-line' to comment to the l
Case 2: If a region selected, the region is expand to make sure the region
contain
whole lines. Then we operate the expanded region. NUM is ignored.
"
- (interactive "p")
+ (interactive "NCopy and comment to line: ")
;; support negative number
(when (< NUM 0)
@@ -439,7 +439,7 @@ or 'C-u 3 M-x
evilnc-quick-comment-or-uncomment-to-the-line' to comment to the l
;;;###autoload
(defun evilnc-copy-to-line (&optional LINENUM)
"Copy from the current line to the LINENUM line, for non-evil user only"
- (interactive "p")
+ (interactive "nCopy to line: ")
(if (not (region-active-p))
(let ((b (line-beginning-position))
(e (line-end-position)))
@@ -455,7 +455,7 @@ or 'C-u 3 M-x
evilnc-quick-comment-or-uncomment-to-the-line' to comment to the l
;;;###autoload
(defun evilnc-kill-to-line (&optional LINENUM)
"Kill from the current line to the LINENUM line, for non-evil user only"
- (interactive "p")
+ (interactive "NKill to line: ")
(if (not (region-active-p))
(let ((b (line-beginning-position))
(e (line-end-position)))
@@ -464,8 +464,8 @@ or 'C-u 3 M-x
evilnc-quick-comment-or-uncomment-to-the-line' to comment to the l
(if (< (line-beginning-position) b)
(setq b (line-beginning-position)))
(if (> (line-end-position) e)
- (setq e (line-end-position)))
- (kill-region b (+ 1 e)) ; +1 because we need remove the CR
+ (setq e (point-max)))
+ (kill-region b e)
))))
;;;###autoload
- [nongnu] elpa/evil-nerd-commenter 277ea53931 067/235: Fixed uncommenting line "spilling" to next line, (continued)
- [nongnu] elpa/evil-nerd-commenter 277ea53931 067/235: Fixed uncommenting line "spilling" to next line, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-nerd-commenter 5f09387d60 069/235: doc updated v1.2.9, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-nerd-commenter c156331ed2 075/235: better comment to the line, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-nerd-commenter a5ec49a54e 079/235: ad for evil-matchit, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-nerd-commenter 336ce1ab67 083/235: readme on using evil-leader, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-nerd-commenter 7ec8564adc 082/235: optimize code a little bit, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-nerd-commenter 1cff8e027d 084/235: updated README, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-nerd-commenter 20a242a085 087/235: tweak README, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-nerd-commenter 10dd7f8f1d 090/235: Merge branch 'tuhdo-master', ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-nerd-commenter c2d8cd947e 089/235: remove some interacitve hint and fixed some bug, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-nerd-commenter b9e34fe377 088/235: Prompt user for input and fix evilnc-kill-to-line,
ELPA Syncer <=
- [nongnu] elpa/evil-nerd-commenter f9bdfa9a70 096/235: sample setup for evil-leader users v1.5.5, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-nerd-commenter 23e4d4d1e1 097/235: updated doc, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-nerd-commenter a88146b600 099/235: fixed: minor bug comment to the line v1.5.7, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-nerd-commenter dfdaae43e9 106/235: Don't byte-compile the evil bits, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-nerd-commenter ac03a92ae6 107/235: updated README v1.5.10, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-nerd-commenter ff0344ed82 110/235: updated README v1.5.12, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-nerd-commenter 1dd577ca35 113/235: clean README, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-nerd-commenter 06ac3b1680 115/235: README updated, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-nerd-commenter f12142e033 118/235: Update evil-nerd-commenter-operator.el, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-nerd-commenter 0529e7c78e 119/235: clean code on kill-ring, ELPA Syncer, 2022/01/06