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

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

[nongnu] elpa/evil-nerd-commenter d34ad3001f: clean code


From: ELPA Syncer
Subject: [nongnu] elpa/evil-nerd-commenter d34ad3001f: clean code
Date: Mon, 18 Jul 2022 10:58:23 -0400 (EDT)

branch: elpa/evil-nerd-commenter
commit d34ad3001f70d041d676df9cd947784244ebe93e
Author: Chen Bin <chenbin.sh@gmail.com>
Commit: Chen Bin <chenbin.sh@gmail.com>

    clean code
---
 evil-nerd-commenter.el | 16 +---------------
 1 file changed, 1 insertion(+), 15 deletions(-)

diff --git a/evil-nerd-commenter.el b/evil-nerd-commenter.el
index db409257f7..12d76fc871 100644
--- a/evil-nerd-commenter.el
+++ b/evil-nerd-commenter.el
@@ -469,20 +469,6 @@ Code snippets embedded in Org-mode is identified and right 
`major-mode' is used.
                comment-operation))
     is-comment))
 
-(defun evilnc--web-mode-comment-or-uncomment (start end)
-  "Comment/uncomment line by line from START to END."
-  ;; end will change when you comment line by line
-  (let* (tmp)
-    ;; make sure start <= end
-    (when (> start end)
-      (setq tmp start)
-      (setq start end)
-      (setq end tmp))
-    (save-excursion
-      (push-mark start t t)
-      (goto-char end)
-      (web-mode-comment-or-uncomment))))
-
 ;;;###autoload
 (defun evilnc-comment-or-uncomment-region-internal (start end)
   "Comment or uncomment region from START to END."
@@ -494,7 +480,7 @@ Code snippets embedded in Org-mode is identified and right 
`major-mode' is used.
         (funcall 'web-mode-comment-erb-block pos))
       (defun web-mode-uncomment-elixir-block (pos)
         (funcall 'web-mode-uncomment-erb-block pos)))
-    (evilnc--web-mode-comment-or-uncomment start end))
+    (web-mode-comment-or-uncomment-region start end))
    (t
     (evilnc--working-on-region start end 'comment-or-uncomment-region))))
 



reply via email to

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