From 3721f7e0721ee8581b5d02c81d3ba6a661f48ccd Mon Sep 17 00:00:00 2001 From: MitchMarq42 Date: Mon, 6 Mar 2023 18:47:03 -0900 Subject: [PATCH] Remove broken evil-join --- lisp/mitch-defuns.el | 46 -------------------------------------------- 1 file changed, 46 deletions(-) diff --git a/lisp/mitch-defuns.el b/lisp/mitch-defuns.el index 3d35759..b4f5f67 100644 --- a/lisp/mitch-defuns.el +++ b/lisp/mitch-defuns.el @@ -28,52 +28,6 @@ Made solely to reduce lines in the init-file." (interactive) (evil-next-line) (scroll-up-line)) - ;; Make evil-join combine lines. Taken from https://github.com/doomemacs/doomemacs/blob/master/modules/editor/evil/autoload/advice.el#L180 -;;;###autoload (autoload '+evil-join-a "lisp/mitch-defuns" nil nil) -;; (defun +evil-join-a (fn beg end) -;; "Join the selected lines. -;; This advice improves on `evil-join' by removing comment delimiters when joining -;; commented lines, without `fill-region-as-paragraph'. -;; Adapted from https://github.com/emacs-evil/evil/issues/606" -;; (if-let* (((not (= (line-end-position) (point-max)))) -;; (cend (save-excursion (goto-char end) (line-end-position))) -;; (cbeg (save-excursion -;; (goto-char beg) -;; (and (doom-point-in-comment-p -;; (save-excursion -;; (goto-char (line-beginning-position 2)) -;; (skip-syntax-forward " \t") -;; (point))) -;; (or (comment-search-backward (line-beginning-position) t) -;; (comment-search-forward (line-end-position) t) -;; (and (doom-point-in-comment-p beg) -;; (stringp comment-continue) -;; (or (search-forward comment-continue (line-end-position) t) -;; beg))))))) -;; (let* ((count (count-lines beg end)) -;; (count (if (> count 1) (1- count) count)) -;; (fixup-mark (make-marker))) -;; (uncomment-region (line-beginning-position 2) -;; (save-excursion -;; (goto-char cend) -;; (line-end-position 0))) -;; (unwind-protect -;; (dotimes (_ count) -;; (join-line 1) -;; (save-match-data -;; (when (or (and comment-continue -;; (not (string-empty-p comment-continue)) -;; (looking-at (concat "\\(\\s-*" (regexp-quote comment-continue) "\\) "))) -;; (and comment-start-skip -;; (not (string-empty-p comment-start-skip)) -;; (looking-at (concat "\\(\\s-*" comment-start-skip "\\)")))) -;; (replace-match "" t nil nil 1) -;; (just-one-space)))) -;; (set-marker fixup-mark nil))) -;; ;; But revert to the default we're not in a comment, where -;; ;; `fill-region-as-paragraph' is too greedy. -;; (funcall fn beg end))) - ;; (advice-add #'evil-join :override #'+evil-join-a) ) (defun mitch/visual-setup () "Commands to run when setting up any display. To be called in use-package