Mercurial > emacs
changeset 95075:b39025681d99
(calc-kill): Make sure that only the stack is operated on.
(calc-kill-region): Kill entire lines.
author | Jay Belanger <jay.p.belanger@gmail.com> |
---|---|
date | Sun, 18 May 2008 05:09:10 +0000 |
parents | a4d67901ed9a |
children | 50d2e5b7b987 |
files | lisp/calc/calc-yank.el |
diffstat | 1 files changed, 8 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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)