emacs-diffs
[Top][All Lists]
Advanced

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

master 61e5570: Make calc-grab-region work with rectangular selects


From: Lars Ingebrigtsen
Subject: master 61e5570: Make calc-grab-region work with rectangular selects
Date: Mon, 6 Sep 2021 06:56:10 -0400 (EDT)

branch: master
commit 61e5570863aa236628a87c722912dea86d2903b0
Author: Lars Ingebrigtsen <larsi@gnus.org>
Commit: Lars Ingebrigtsen <larsi@gnus.org>

    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 27a6cff..800ec7a 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)



reply via email to

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