From ba211d51f487b07303b6c892fbc9d1c97b439ea2 Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Wed, 22 Oct 2025 23:54:42 -0500 Subject: refactor:custom-line-paragraph:: Remove expand-region demand Remove the demand for expand-region package and require it in `cj/join-paragraph` function instead. This streamlines the package loading process and keeps its usage localized to the part of the code that actually needs it. --- modules/custom-line-paragraph.el | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'modules') diff --git a/modules/custom-line-paragraph.el b/modules/custom-line-paragraph.el index cb89a6f5..a23199e7 100644 --- a/modules/custom-line-paragraph.el +++ b/modules/custom-line-paragraph.el @@ -18,10 +18,6 @@ ;;; Code: - -(use-package expand-region - :demand t) ;; used w/in join paragraph - (defun cj/join-line-or-region () "Join lines in the active region or join the current line with the previous one." (interactive) @@ -36,12 +32,14 @@ ;; No region - only join if there's a previous line (when (> (line-number-at-pos) 1) (join-line)) + (end-of-line) (newline))) (defun cj/join-paragraph () "Join all lines in the current paragraph using `cj/join-line-or-region'." (interactive) - (er/mark-paragraph) ;; from package expand region + (require 'expand-region) + (er/mark-paragraph) (cj/join-line-or-region) (forward-line)) -- cgit v1.2.3