[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/calc/calc-ext.el
From: |
Juanma Barranquero |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/calc/calc-ext.el |
Date: |
Tue, 04 Feb 2003 07:47:11 -0500 |
Index: emacs/lisp/calc/calc-ext.el
diff -c emacs/lisp/calc/calc-ext.el:1.12 emacs/lisp/calc/calc-ext.el:1.13
*** emacs/lisp/calc/calc-ext.el:1.12 Wed Jan 15 10:16:25 2003
--- emacs/lisp/calc/calc-ext.el Tue Feb 4 07:47:09 2003
***************
*** 3,9 ****
;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2002 Free Software Foundation,
Inc.
;; Author: David Gillespie <address@hidden>
! ;; Maintainers: D. Goel <address@hidden>
;; Colin Walters <address@hidden>
;; This file is part of GNU Emacs.
--- 3,9 ----
;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2002 Free Software Foundation,
Inc.
;; Author: David Gillespie <address@hidden>
! ;; Maintainers: D. Goel <address@hidden>
;; Colin Walters <address@hidden>
;; This file is part of GNU Emacs.
***************
*** 660,666 ****
(define-key calc-alg-map "\e\C-m" 'calc-last-args-stub)
(define-key calc-alg-map "\e\177" 'calc-pop-above)
))
!
;; The following is a relic for backward compatability only.
;; The calc-define property list is now the recommended method.
(if (and (boundp 'calc-ext-defs)
--- 660,666 ----
(define-key calc-alg-map "\e\C-m" 'calc-last-args-stub)
(define-key calc-alg-map "\e\177" 'calc-pop-above)
))
!
;; The following is a relic for backward compatability only.
;; The calc-define property list is now the recommended method.
(if (and (boundp 'calc-ext-defs)
***************
*** 1631,1639 ****
( * ( * ) ( * ) )
( / ( / ) ( ) )
( | ( | ) ( | ) )
! ( calcFunc-land ( calcFunc-land )
( calcFunc-land ) )
! ( calcFunc-lor ( calcFunc-lor )
( calcFunc-lor ) ) ))
--- 1631,1639 ----
( * ( * ) ( * ) )
( / ( / ) ( ) )
( | ( | ) ( | ) )
! ( calcFunc-land ( calcFunc-land )
( calcFunc-land ) )
! ( calcFunc-lor ( calcFunc-lor )
( calcFunc-lor ) ) ))
***************
*** 2725,2731 ****
(math-integerp int) (math-integerp num) (math-integerp den)
(not (math-zerop den))
(list 'frac (math-add num (math-mul int den)) den)))))
!
;; Fractions
((string-match "^\\([0-9]*\\)[:/]\\([0-9]*\\)$" s)
(let ((num (math-match-substring s 1))
--- 2725,2731 ----
(math-integerp int) (math-integerp num) (math-integerp den)
(not (math-zerop den))
(list 'frac (math-add num (math-mul int den)) den)))))
!
;; Fractions
((string-match "^\\([0-9]*\\)[:/]\\([0-9]*\\)$" s)
(let ((num (math-match-substring s 1))
***************
*** 2735,2741 ****
(and num den (math-integerp num) (math-integerp den)
(not (math-zerop den))
(list 'frac num den)))))
!
;; Modulo forms
((string-match "^\\(.*\\) *mod *\\(.*\\)$" s)
(let* ((n (math-match-substring s 1))
--- 2735,2741 ----
(and num den (math-integerp num) (math-integerp den)
(not (math-zerop den))
(list 'frac num den)))))
!
;; Modulo forms
((string-match "^\\(.*\\) *mod *\\(.*\\)$" s)
(let* ((n (math-match-substring s 1))
***************
*** 2771,2777 ****
(math-zerop (nth 1 minsec)))
(math-add (list 'hms hours 0 0) minsec))
(t nil)))))
!
;; Minutes
((string-match "^\\([^'#^]+\\)[mM']\\(.*\\)$" s)
(let* ((minutes (math-match-substring s 1))
--- 2771,2777 ----
(math-zerop (nth 1 minsec)))
(math-add (list 'hms hours 0 0) minsec))
(t nil)))))
!
;; Minutes
((string-match "^\\([^'#^]+\\)[mM']\\(.*\\)$" s)
(let* ((minutes (math-match-substring s 1))
***************
*** 2789,2795 ****
(math-zerop (nth 2 seconds)))
(math-add (list 'hms 0 minutes 0) seconds))
(t nil)))))
!
;; Seconds
((string-match "^\\([^\"#^]+\\)[sS\"]$" s)
(let ((seconds (math-read-number (math-match-substring s 1))))
--- 2789,2795 ----
(math-zerop (nth 2 seconds)))
(math-add (list 'hms 0 minutes 0) seconds))
(t nil)))))
!
;; Seconds
((string-match "^\\([^\"#^]+\\)[sS\"]$" s)
(let ((seconds (math-read-number (math-match-substring s 1))))
***************
*** 2797,2803 ****
(not (math-negp seconds))
(Math-lessp seconds 60)
(list 'hms 0 0 seconds))))
!
;; Integer+fraction with explicit radix
((string-match
"^\\([0-9]+\\)\\(#\\|\\^\\^\\)\\([0-9a-zA-Z]*\\)[:/]\\([0-9a-zA-Z]*\\)[:/]\\([0-9a-zA-Z]\\)$"
s)
(let ((radix (string-to-int (math-match-substring s 1)))
--- 2797,2803 ----
(not (math-negp seconds))
(Math-lessp seconds 60)
(list 'hms 0 0 seconds))))
!
;; Integer+fraction with explicit radix
((string-match
"^\\([0-9]+\\)\\(#\\|\\^\\^\\)\\([0-9a-zA-Z]*\\)[:/]\\([0-9a-zA-Z]*\\)[:/]\\([0-9a-zA-Z]\\)$"
s)
(let ((radix (string-to-int (math-match-substring s 1)))
***************
*** 2811,2817 ****
(list 'frac
(math-add num (math-mul int den))
den)))))
!
;; Fraction with explicit radix
((string-match
"^\\([0-9]+\\)\\(#\\|\\^\\^\\)\\([0-9a-zA-Z]*\\)[:/]\\([0-9a-zA-Z]*\\)$" s)
(let ((radix (string-to-int (math-match-substring s 1)))
--- 2811,2817 ----
(list 'frac
(math-add num (math-mul int den))
den)))))
!
;; Fraction with explicit radix
((string-match
"^\\([0-9]+\\)\\(#\\|\\^\\^\\)\\([0-9a-zA-Z]*\\)[:/]\\([0-9a-zA-Z]*\\)$" s)
(let ((radix (string-to-int (math-match-substring s 1)))
***************
*** 2820,2830 ****
(let ((num (if (> (length num) 0) (math-read-radix num radix) 1))
(den (if (> (length den) 0) (math-read-radix den radix) 1)))
(and num den (not (math-zerop den)) (list 'frac num den)))))
!
;; Float with explicit radix and exponent
((or (string-match
"^0*\\(\\([2-9]\\|1[0-4]\\)\\(#\\|\\^\\^\\)[0-9a-dA-D.]+\\)[eE]\\([-+]?[0-9]+\\)$"
s)
(string-match "^\\(\\([0-9]+\\)\\(#\\|\\^\\^\\)[0-9a-zA-Z.]+\\) *\\*
*\\2\\.? *\\^ *\\([-+]?[0-9]+\\)$" s))
! (let ((radix (string-to-int (math-match-substring s 2)))
(mant (math-match-substring s 1))
(exp (math-match-substring s 4)))
(let ((mant (math-read-number mant))
--- 2820,2830 ----
(let ((num (if (> (length num) 0) (math-read-radix num radix) 1))
(den (if (> (length den) 0) (math-read-radix den radix) 1)))
(and num den (not (math-zerop den)) (list 'frac num den)))))
!
;; Float with explicit radix and exponent
((or (string-match
"^0*\\(\\([2-9]\\|1[0-4]\\)\\(#\\|\\^\\^\\)[0-9a-dA-D.]+\\)[eE]\\([-+]?[0-9]+\\)$"
s)
(string-match "^\\(\\([0-9]+\\)\\(#\\|\\^\\^\\)[0-9a-zA-Z.]+\\) *\\*
*\\2\\.? *\\^ *\\([-+]?[0-9]+\\)$" s))
! (let ((radix (string-to-int (math-match-substring s 2)))
(mant (math-match-substring s 1))
(exp (math-match-substring s 4)))
(let ((mant (math-read-number mant))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] Changes to emacs/lisp/calc/calc-ext.el,
Juanma Barranquero <=