From 102258fe1c0bdd2a4c1d9e7ea6c0209f9d62f735 Mon Sep 17 00:00:00 2001 From: Lars Ingebrigtsen Date: Sun, 21 Aug 2022 18:13:00 +0200 Subject: [PATCH] Simplify `delete-line' * lisp/subr.el (delete-line): Simplify. --- lisp/subr.el | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/lisp/subr.el b/lisp/subr.el index cd6a9be099c..3fde0551cc8 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -6904,10 +6904,7 @@ OBJECT if it is readable." (defun delete-line () "Delete the current line." - (delete-region (line-beginning-position) - (progn - (forward-line 1) - (point)))) + (delete-region (pos-bol) (pos-bol 2))) (defun ensure-empty-lines (&optional lines) "Ensure that there are LINES number of empty lines before point. -- 2.39.5