aboutsummaryrefslogtreecommitdiff
path: root/modules/custom-line-paragraph.el
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2025-10-22 23:54:42 -0500
committerCraig Jennings <c@cjennings.net>2025-10-22 23:54:42 -0500
commitf42b84bfd4cc7cb9d96167eb21514db022cecd85 (patch)
treee6d79361d043dc9ed7bb2d288ffe0529d2bce3be /modules/custom-line-paragraph.el
parentcc944a818c26f3f07b53b897d736583df0eb296f (diff)
downloaddotemacs-f42b84bfd4cc7cb9d96167eb21514db022cecd85.tar.gz
dotemacs-f42b84bfd4cc7cb9d96167eb21514db022cecd85.zip
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.
Diffstat (limited to 'modules/custom-line-paragraph.el')
-rw-r--r--modules/custom-line-paragraph.el8
1 files changed, 3 insertions, 5 deletions
diff --git a/modules/custom-line-paragraph.el b/modules/custom-line-paragraph.el
index cb89a6f57..a23199e75 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))