3 |
;; Copyright (C) 1990, 1991, 1992, 1993, 2001 Free Software Foundation, Inc. |
;; Copyright (C) 1990, 1991, 1992, 1993, 2001 Free Software Foundation, Inc. |
4 |
|
|
5 |
;; Author: David Gillespie <daveg@synaptics.com> |
;; Author: David Gillespie <daveg@synaptics.com> |
6 |
;; Maintainer: Colin Walters <walters@debian.org> |
;; Maintainers: D. Goel <deego@gnufans.org> |
7 |
|
;; Colin Walters <walters@debian.org> |
8 |
|
|
9 |
;; This file is part of GNU Emacs. |
;; This file is part of GNU Emacs. |
10 |
|
|
166 |
(message "Calc %s" calc-version)) |
(message "Calc %s" calc-version)) |
167 |
|
|
168 |
|
|
169 |
(defun calc-flush-caches () |
(defun calc-flush-caches (&optional inhibit-msg) |
170 |
(interactive) |
(interactive "P") |
171 |
(calc-wrapper |
(calc-wrapper |
172 |
(setq math-lud-cache nil |
(setq math-lud-cache nil |
173 |
math-log2-cache nil |
math-log2-cache nil |
185 |
math-format-date-cache nil |
math-format-date-cache nil |
186 |
math-holidays-cache-tag t) |
math-holidays-cache-tag t) |
187 |
(mapcar (function (lambda (x) (set x -100))) math-cache-list) |
(mapcar (function (lambda (x) (set x -100))) math-cache-list) |
188 |
(message "All internal calculator caches have been reset"))) |
(unless inhibit-msg |
189 |
|
(message "All internal calculator caches have been reset")))) |
190 |
|
|
191 |
|
|
192 |
;;; Conversions. |
;;; Conversions. |
209 |
(defun calc-clean-num (num) |
(defun calc-clean-num (num) |
210 |
(interactive "P") |
(interactive "P") |
211 |
(calc-clean (- (if num |
(calc-clean (- (if num |
212 |
(prefix-numeric-value num) |
(prefix-numeric-value num) |
213 |
(if (and (>= last-command-char ?0) |
(if (and (>= last-command-char ?0) |
214 |
(<= last-command-char ?9)) |
(<= last-command-char ?9)) |
215 |
(- last-command-char ?0) |
(- last-command-char ?0) |