]> code.delx.au - gnu-emacs/blobdiff - lisp/calc/calc-aent.el
* view.el (view-recenter): Allow recenter to compute window height
[gnu-emacs] / lisp / calc / calc-aent.el
index 935ec4d601ebda7ea49eff01768dc6bdb7cc1283..22afd43a34e90f99f1b72d675b92040c3cbe7d04 100644 (file)
@@ -1,17 +1,17 @@
 ;;; calc-aent.el --- algebraic entry functions 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: Dave Gillespie <daveg@synaptics.com>
 ;; Maintainer: Jay Belanger <jay.p.belanger@gmail.com>
 
 ;; This file is part of GNU Emacs.
 
-;; GNU Emacs is free software; you can redistribute it and/or modify
+;; GNU Emacs is free software: you can redistribute it and/or modify
 ;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation; either version 3, or (at your option)
-;; any later version.
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
 
 ;; GNU Emacs is distributed in the hope that it will be useful,
 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -19,9 +19,7 @@
 ;; GNU General Public License for more details.
 
 ;; You should have received a copy of the GNU General Public License
-;; along with GNU Emacs; see the file COPYING.  If not, write to the
-;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
-;; Boston, MA 02110-1301, USA.
+;; along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
 
 ;;; Commentary:
 
                    (setq buf long))))
          (calc-handle-whys)
          (message "Result: %s" buf)))
-      (if (eq last-command-char 10)
+      (if (eq last-command-event 10)
          (insert shortbuf)
         (kill-new shortbuf)))))
 
@@ -281,7 +279,7 @@ The value t means abort and give an error message.")
   (calc-wrapper
    (let ((calc-language (if prefix nil calc-language))
         (math-expr-opers (if prefix (math-standard-ops) (math-expr-ops))))
-     (calc-alg-entry (and auto (char-to-string last-command-char))))))
+     (calc-alg-entry (and auto (char-to-string last-command-event))))))
 
 (defvar calc-alg-entry-history nil
   "History for algebraic entry.")
@@ -298,7 +296,7 @@ The value t means abort and give an error message.")
        (progn
          (require 'calc-ext)
          (calc-alg-edit alg-exp))
-      (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))
             (nvals (mapcar 'calc-normalize alg-exp)))
@@ -470,12 +468,12 @@ The value t means abort and give an error message.")
 ;;;###autoload
 (defun calc-alg-digit-entry ()
   (calc-alg-entry
-   (cond ((eq last-command-char ?e)
+   (cond ((eq last-command-event ?e)
          (if (> calc-number-radix 14) (format "%d.^" calc-number-radix) "1e"))
-        ((eq last-command-char ?#) (format "%d#" calc-number-radix))
-        ((eq last-command-char ?_) "-")
-        ((eq last-command-char ?@) "0@ ")
-        (t (char-to-string last-command-char)))))
+        ((eq last-command-event ?#) (format "%d#" calc-number-radix))
+        ((eq last-command-event ?_) "-")
+        ((eq last-command-event ?@) "0@ ")
+        (t (char-to-string last-command-event)))))
 
 ;; The variable calc-digit-value is initially declared in calc.el,
 ;; but can be set by calcDigit-algebraic and calcDigit-edit.