# HG changeset patch # User Jay Belanger # Date 1211087350 0 # Node ID b39025681d99e38ca3eb77d731e75eb1fd7ecdfd # Parent a4d67901ed9a73f37c3797244d4ea664253b4ddb (calc-kill): Make sure that only the stack is operated on. (calc-kill-region): Kill entire lines. diff -r a4d67901ed9a -r b39025681d99 lisp/calc/calc-yank.el --- a/lisp/calc/calc-yank.el Sat May 17 22:55:57 2008 +0000 +++ b/lisp/calc/calc-yank.el Sun May 18 05:09:10 2008 +0000 @@ -46,6 +46,7 @@ (setq num (1- num))) (setq num (- num n) n (- n)))) + (calc-check-stack num) (let ((stuff (calc-top-list n (- num n -1)))) (calc-cursor-stack-index num) (let ((first (point))) @@ -82,9 +83,15 @@ (calc-force-refresh) (calc-set-command-flag 'no-align) (let* ((top-num (calc-locate-cursor-element top)) + (top-pos (save-excursion + (calc-cursor-stack-index top-num) + (point))) (bot-num (calc-locate-cursor-element (1- bot))) + (bot-pos (save-excursion + (calc-cursor-stack-index (max 0 (1- bot-num))) + (point))) (num (- top-num bot-num -1))) - (copy-region-as-kill top bot) + (copy-region-as-kill top-pos bot-pos) (setq calc-last-kill (cons (car kill-ring) (calc-top-list num bot-num))) (if (not no-delete)