branch: elpa/crux commit 3e03d7272f99939eb669c59f5b8843912e1e49cf Author: Syohei YOSHIDA <syo...@gmail.com> Commit: Bozhidar Batsov <bozhidar.bat...@gmail.com>
Don't use dash.el function (#34) --- crux.el | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/crux.el b/crux.el index 157b07b..ed3e306 100644 --- a/crux.el +++ b/crux.el @@ -234,12 +234,11 @@ point reaches the beginning or end of the buffer, stop there." (pcase-let* ((origin (point)) (`(,beg . ,end) (crux-get-positions-of-line-or-region)) (region (buffer-substring-no-properties beg end))) - (-dotimes arg - (lambda (n) - (goto-char end) - (newline) - (insert region) - (setq end (point)))) + (dotimes (_i arg) + (goto-char end) + (newline) + (insert region) + (setq end (point))) (goto-char (+ origin (* (length region) arg) arg)))) (defun crux-duplicate-and-comment-current-line-or-region (arg) @@ -252,12 +251,11 @@ point reaches the beginning or end of the buffer, stop there." (region (buffer-substring-no-properties beg end))) (comment-or-uncomment-region beg end) (setq end (line-end-position)) - (-dotimes arg - (lambda (n) - (goto-char end) - (newline) - (insert region) - (setq end (point)))) + (dotimes (_ arg) + (goto-char end) + (newline) + (insert region) + (setq end (point))) (goto-char (+ origin (* (length region) arg) arg)))) (defun crux-rename-file-and-buffer ()