From 61e5570863aa236628a87c722912dea86d2903b0 Mon Sep 17 00:00:00 2001 From: Lars Ingebrigtsen Date: Mon, 6 Sep 2021 12:56:02 +0200 Subject: [PATCH] Make calc-grab-region work with rectangular selects * lisp/calc/calc.el (calc-grab-region): Heed `rectangle-mark-mode' (bug#50403). --- lisp/calc/calc.el | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lisp/calc/calc.el b/lisp/calc/calc.el index 27a6cff627c..800ec7a6a38 100644 --- a/lisp/calc/calc.el +++ b/lisp/calc/calc.el @@ -139,6 +139,7 @@ ;;; Code: (require 'calc-macs) +(require 'rect) ;; Declare functions which are defined elsewhere. (declare-function calc-set-language "calc-lang" (lang &optional option no-refresh)) @@ -3388,7 +3389,9 @@ and all digits are kept, regardless of Calc's current precision." "Parse the region as a vector of numbers and push it on the Calculator stack." (interactive "r\nP") (require 'calc-ext) - (calc-do-grab-region top bot arg)) + (if rectangle-mark-mode + (calc-do-grab-rectangle top bot arg) + (calc-do-grab-region top bot arg))) ;;;###autoload (defun calc-grab-rectangle (top bot arg) -- 2.39.2