From: Jay Belanger Date: Sat, 28 May 2005 05:36:16 +0000 (+0000) Subject: (calc-embedded-make-info): Adjust positioning of end of selected X-Git-Tag: emacs-pretest-22.0.90~9463 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=c622c18ec0d4aed4a57fea55171f52eff59e2c20;p=emacs.git (calc-embedded-make-info): Adjust positioning of end of selected region when an argument is given. --- diff --git a/lisp/calc/calc-embed.el b/lisp/calc/calc-embed.el index 75ba72a694b..e6e95cae0ac 100644 --- a/lisp/calc/calc-embed.el +++ b/lisp/calc/calc-embed.el @@ -815,10 +815,11 @@ The command \\[yank] can retrieve it from there." (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))))