emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/calc/calc.el


From: Jay Belanger
Subject: [Emacs-diffs] Changes to emacs/lisp/calc/calc.el
Date: Mon, 02 May 2005 15:45:57 -0400

Index: emacs/lisp/calc/calc.el
diff -c emacs/lisp/calc/calc.el:1.53 emacs/lisp/calc/calc.el:1.54
*** emacs/lisp/calc/calc.el:1.53        Mon Apr 25 22:20:03 2005
--- emacs/lisp/calc/calc.el     Mon May  2 19:45:57 2005
***************
*** 2136,2142 ****
       (t
        (insert (char-to-string last-command-char))
        (if (or (and (calc-minibuffer-contains "[-+]?\\(.*\\+/- *\\|.*mod 
*\\)?\\([0-9][0-9]?\\)#[0-9a-zA-Z]*\\(:[0-9a-zA-Z]*\\(:[0-9a-zA-Z]*\\)?\\|.[0-9a-zA-Z]*\\(e[-+]?[0-9]*\\)?\\)?\\'")
!                  (let ((radix (string-to-int
                                 (buffer-substring
                                  (match-beginning 2) (match-end 2)))))
                     (and (>= radix 2)
--- 2136,2142 ----
       (t
        (insert (char-to-string last-command-char))
        (if (or (and (calc-minibuffer-contains "[-+]?\\(.*\\+/- *\\|.*mod 
*\\)?\\([0-9][0-9]?\\)#[0-9a-zA-Z]*\\(:[0-9a-zA-Z]*\\(:[0-9a-zA-Z]*\\)?\\|.[0-9a-zA-Z]*\\(e[-+]?[0-9]*\\)?\\)?\\'")
!                  (let ((radix (string-to-number
                                 (buffer-substring
                                  (match-beginning 2) (match-end 2)))))
                     (and (>= radix 2)
***************
*** 3278,3284 ****
                (eq (aref digs 0) ?0))
           (math-read-number (concat "8#" digs))
         (if (<= (length digs) 6)
!            (string-to-int digs)
           (cons 'bigpos (math-read-bignum digs))))))
  
      ;; Clean up the string if necessary
--- 3278,3284 ----
                (eq (aref digs 0) ?0))
           (math-read-number (concat "8#" digs))
         (if (<= (length digs) 6)
!            (string-to-number digs)
           (cons 'bigpos (math-read-bignum digs))))))
  
      ;; Clean up the string if necessary
***************
*** 3315,3321 ****
           (exp (math-match-substring s 2)))
         (let ((mant (if (> (length mant) 0) (math-read-number mant) 1))
             (exp (if (<= (length exp) (if (memq (aref exp 0) '(?+ ?-)) 8 7))
!                     (string-to-int exp))))
         (and mant exp (Math-realp mant) (> exp -4000000) (< exp 4000000)
              (let ((mant (math-float mant)))
                (list 'float (nth 1 mant) (+ (nth 2 mant) exp)))))))
--- 3315,3321 ----
           (exp (math-match-substring s 2)))
         (let ((mant (if (> (length mant) 0) (math-read-number mant) 1))
             (exp (if (<= (length exp) (if (memq (aref exp 0) '(?+ ?-)) 8 7))
!                     (string-to-number exp))))
         (and mant exp (Math-realp mant) (> exp -4000000) (< exp 4000000)
              (let ((mant (math-float mant)))
                (list 'float (nth 1 mant) (+ (nth 2 mant) exp)))))))
***************
*** 3330,3338 ****
  
  (defun math-read-bignum (s)   ; [l X]
    (if (> (length s) 3)
!       (cons (string-to-int (substring s -3))
            (math-read-bignum (substring s 0 -3)))
!     (list (string-to-int s))))
  
  
  (defconst math-tex-ignore-words
--- 3330,3338 ----
  
  (defun math-read-bignum (s)   ; [l X]
    (if (> (length s) 3)
!       (cons (string-to-number (substring s -3))
            (math-read-bignum (substring s 0 -3)))
!     (list (string-to-number s))))
  
  
  (defconst math-tex-ignore-words




reply via email to

[Prev in Thread] Current Thread [Next in Thread]