From: Christian Heller Date: Fri, 15 Feb 2019 02:44:47 +0000 (+0100) Subject: Simplify plomvi-Y code. X-Git-Url: https://plomlompom.com/repos/%22https:/validator.w3.org/static/todos?a=commitdiff_plain;h=5ba1b297ba4d62a2c686f6f226b433c699f47cab;p=plomvi.el Simplify plomvi-Y code. --- diff --git a/plomvi.el b/plomvi.el index 34524fd..6c9df1d 100644 --- a/plomvi.el +++ b/plomvi.el @@ -181,20 +181,14 @@ Note that this ignores killed rectangles." (start-end-pos (region-end)) (region-start (progn (goto-char start-start-pos) - (beginning-of-line) - (point))) + (line-beginning-position))) (region-end (progn (goto-char start-end-pos) - (end-of-line) - (+ 1 (point))))) + (+ 1 (line-end-position))))) (copy-region-as-kill region-start region-end) (goto-char region-start))) (t - (let ((keep-pos (point)) - (region-start (progn (beginning-of-line) (point))) - (region-end (progn (end-of-line) (+ 1 (point))))) - (copy-region-as-kill region-start region-end) - (goto-char keep-pos))))) + (copy-region-as-kill (line-beginning-position) (+ 1 (line-end-position)))))) (defun plomvi-copy-region() "Copy marked region."