]> code.delx.au - gnu-emacs/commitdiff
(calc-kill): Make sure that only the stack is operated on.
authorJay Belanger <jay.p.belanger@gmail.com>
Sun, 18 May 2008 05:10:51 +0000 (05:10 +0000)
committerJay Belanger <jay.p.belanger@gmail.com>
Sun, 18 May 2008 05:10:51 +0000 (05:10 +0000)
(calc-kill-region): Kill entire lines.

lisp/ChangeLog
lisp/calc/calc-yank.el

index 9f4d24bd100f0951143c823f94d700a7c063e202..40189330206dc555c42ac7e8d26110657dd8a944 100644 (file)
@@ -1,3 +1,9 @@
+2008-05-18  Jay Belanger  <jay.p.belanger@gmail.com>
+
+       * calc/calc-yank.el (calc-kill): Make sure that only the stack is
+       operated on.
+       (calc-kill-region): Kill entire lines.
+
 2008-05-17  Glenn Morris  <rgm@gnu.org>
 
        * ezimage.el (ezimage-use-images): Drop support for Emacs < 21 and
index be44a3b25d424d94e3bf054e81e227bfb1ec6e58..a9a0e54b9a8cac40b39193e174fc796fe64a418e 100644 (file)
@@ -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)))
        (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)