]> code.delx.au - gnu-emacs/blobdiff - lisp/calc/calc-yank.el
(math-build-units-table-buffer): Let `calc-twos-complement-mode' be nil.
[gnu-emacs] / lisp / calc / calc-yank.el
index 65bec46db8e90c21510546e37b837f3d0d598181..d284b4e1fd15bd2c7bfc1654b189deb2af97d92f 100644 (file)
@@ -1,7 +1,7 @@
 ;;; calc-yank.el --- kill-ring functionality for Calc
 
 ;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2002, 2003, 2004,
-;;   2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+;;   2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
 
 ;; Author: David Gillespie <daveg@synaptics.com>
 ;; Maintainer: Jay Belanger <jay.p.belanger@gmail.com>
@@ -444,14 +444,12 @@ With prefix arg, also delete the region."
                (setq top (point))
                (calc-cursor-stack-index 0)
                (setq bot (point))))
-        (save-excursion
-          (set-buffer newbuf)
+        (with-current-buffer newbuf
           (if (consp nn)
               (kill-region (region-beginning) (region-end)))
           (push-mark (point) t)
           (if (and overwrite-mode (not (consp nn)))
-              (calc-overwrite-string (save-excursion
-                                       (set-buffer oldbuf)
+              (calc-overwrite-string (with-current-buffer oldbuf
                                        (buffer-substring top bot))
                                      eat-lnums)
             (or (bolp) (setq eat-lnums nil))
@@ -489,7 +487,7 @@ With prefix arg, also delete the region."
        (insert str))
     (let ((i 0))
       (while (< i (length str))
-       (if (= (setq last-command-char (aref str i)) ?\n)
+       (if (= (setq last-command-event (aref str i)) ?\n)
            (or (= i (1- (length str)))
                (let ((pt (point)))
                  (end-of-line)
@@ -702,7 +700,7 @@ To cancel the edit, simply kill the *Calc Edit* buffer."
         (if calc-edit-disp-trail
             (calc-trail-display 1 t))
         (and vals
-             (let ((calc-simplify-mode (if (eq last-command-char ?\C-j)
+             (let ((calc-simplify-mode (if (eq last-command-event ?\C-j)
                                            'none
                                          calc-simplify-mode)))
                (if (>= num 0)