bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#31240: 26.1; mouse-save-then-kill does not kill rectangles


From: Charles A. Roelli
Subject: bug#31240: 26.1; mouse-save-then-kill does not kill rectangles
Date: Sun, 30 Sep 2018 17:45:06 +0200

Thanks for the updated patch, it looks good to me.  I have one small
suggestion:

> +(defun rectangle-position-as-coordinates (position)
> +  "Return an integer buffer position as a (COL . LINE) coordinate."
> +  (save-excursion
> +    (goto-char position)
> +    (let ((col (current-column))
> +          (line (progn
> +                  (beginning-of-line)
> +                  (count-lines 1 position))))
> +      (cons col line))))

(beginning-of-line) could be replaced with (forward-line 0), which is
guaranteed to be at the beginning of the line.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]