diff options
author | Colin Walters <walters@gnu.org> | 2001-11-19 07:44:56 +0000 |
---|---|---|
committer | Colin Walters <walters@gnu.org> | 2001-11-19 07:44:56 +0000 |
commit | 3132f345bc1ab68e4425178266e3d4ad1b2ccd02 (patch) | |
tree | 43339ccf578fb555b44dd0c84aa0e7b0389dc8b0 /lisp/calc/calc-stuff.el | |
parent | f269b73e3ea3de8c539d544fd0310b63fc029f20 (diff) | |
download | emacs-3132f345bc1ab68e4425178266e3d4ad1b2ccd02.tar.gz |
Change all toplevel `setq' forms to `defvar' forms, and move them
before their first use. Use `when', `unless'. Remove trailing
periods from error forms. Add description and headers suggested by
Emacs Lisp coding conventions.
Diffstat (limited to 'lisp/calc/calc-stuff.el')
-rw-r--r-- | lisp/calc/calc-stuff.el | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/lisp/calc/calc-stuff.el b/lisp/calc/calc-stuff.el index bbf520dcaef..fb3891f5c45 100644 --- a/lisp/calc/calc-stuff.el +++ b/lisp/calc/calc-stuff.el @@ -1,6 +1,9 @@ -;; Calculator for GNU Emacs, part II [calc-stuff.el] +;;; calc-stuff.el --- miscellaneous functions for Calc + ;; Copyright (C) 1990, 1991, 1992, 1993, 2001 Free Software Foundation, Inc. -;; Written by Dave Gillespie, daveg@synaptics.com. + +;; Author: David Gillespie <daveg@synaptics.com> +;; Maintainer: Colin Walters <walters@debian.org> ;; This file is part of GNU Emacs. @@ -19,7 +22,9 @@ ;; file named COPYING. Among other things, the copyright notice ;; and this notice must be preserved on all copies. +;;; Commentary: +;;; Code: ;; This file is autoloaded from calc-ext.el. (require 'calc-ext) @@ -68,6 +73,8 @@ With a prefix, push that prefix as a number onto the stack." (message "max-lisp-eval-depth is now %d" max-lisp-eval-depth)) +(defvar calc-which-why nil) +(defvar calc-last-why-command nil) (defun calc-explain-why (why &optional more) (if (eq (car why) '*) (setq why (cdr why))) @@ -151,13 +158,11 @@ With a prefix, push that prefix as a number onto the stack." (message "(No further explanations available)") (setq calc-which-why calc-why)) (message "No explanations available")))) -(setq calc-which-why nil) -(setq calc-last-why-command nil) (defun calc-version () (interactive) - (message "Calc %s, installed %s" calc-version calc-installed-date)) + (message "Calc %s" calc-version)) (defun calc-flush-caches () @@ -179,7 +184,7 @@ With a prefix, push that prefix as a number onto the stack." math-format-date-cache nil math-holidays-cache-tag t) (mapcar (function (lambda (x) (set x -100))) math-cache-list) - (message "All internal calculator caches have been reset."))) + (message "All internal calculator caches have been reset"))) ;;; Conversions. @@ -209,6 +214,7 @@ With a prefix, push that prefix as a number onto the stack." (error "Number required")))))) +(defvar math-chopping-small nil) (defun calcFunc-clean (a &optional prec) ; [X X S] [Public] (if prec (cond ((Math-messy-integerp prec) @@ -250,7 +256,6 @@ With a prefix, push that prefix as a number onto the stack." ((Math-objectp a) a) ((math-infinitep a) a) (t (list 'calcFunc-clean a))))) -(setq math-chopping-small nil) (defun calcFunc-pclean (a &optional prec) (math-map-over-constants (function (lambda (x) (calcFunc-clean x prec))) |