changeset 62840:58322099b4d7

(calc-embedded-make-info): Adjust positioning of end of selected region when an argument is given.
author Jay Belanger <jay.p.belanger@gmail.com>
date Sat, 28 May 2005 05:36:16 +0000
parents 8ee1e48392f6
children f4e893dee2a6
files lisp/calc/calc-embed.el
diffstat 1 files changed, 5 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/calc/calc-embed.el	Sat May 28 05:29:14 2005 +0000
+++ b/lisp/calc/calc-embed.el	Sat May 28 05:36:16 2005 +0000
@@ -815,10 +815,11 @@
 		(aset info 2 (copy-marker (region-beginning)))
 		(aset info 3 (copy-marker (region-end))))
 	    (aset info (if (> calc-embed-arg 0) 2 3) (point-marker))
-	    (forward-line calc-embed-arg)
-            (when (> calc-embed-arg 0)
-              (forward-line -1)
-              (end-of-line))
+            (if (> calc-embed-arg 0)
+                (progn
+                  (forward-line (1- calc-embed-arg))
+                  (end-of-line))
+              (forward-line (1+ calc-embed-arg)))
 	    (aset info (if (> calc-embed-arg 0) 3 2) (point-marker)))
 	  (aset info 4 (copy-marker (aref info 2)))
 	  (aset info 5 (copy-marker (aref info 3))))