aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorColin Walters2001-11-19 07:36:42 +0000
committerColin Walters2001-11-19 07:36:42 +0000
commitdac12d8087da08547a20840e8fd8a520c7a6ad37 (patch)
tree3fb7a2fb5d22ddeac66eccfc620fecfb65f4dd03
parent3e3b3c7e386d4345dfb2d7537341de49ca4a3aac (diff)
downloademacs-dac12d8087da08547a20840e8fd8a520c7a6ad37.tar.gz
emacs-dac12d8087da08547a20840e8fd8a520c7a6ad37.zip
(math-fixnump, math-fixnatnump, calcFunc-trunc)
(calcFunc-floor): Ditto. 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.
-rw-r--r--lisp/calc/calc-misc.el25
1 files changed, 15 insertions, 10 deletions
diff --git a/lisp/calc/calc-misc.el b/lisp/calc/calc-misc.el
index d1cecd2c703..226ba02de2a 100644
--- a/lisp/calc/calc-misc.el
+++ b/lisp/calc/calc-misc.el
@@ -1,6 +1,9 @@
1;; Calculator for GNU Emacs, part I [calc-misc.el] 1;;; calc-misc.el --- miscellaenous functions for Calc
2
2;; Copyright (C) 1990, 1991, 1992, 1993, 2001 Free Software Foundation, Inc. 3;; Copyright (C) 1990, 1991, 1992, 1993, 2001 Free Software Foundation, Inc.
3;; Written by Dave Gillespie, daveg@synaptics.com. 4
5;; Author: David Gillespie <daveg@synaptics.com>
6;; Maintainer: Colin Walters <walters@debian.org>
4 7
5;; This file is part of GNU Emacs. 8;; This file is part of GNU Emacs.
6 9
@@ -19,7 +22,9 @@
19;; file named COPYING. Among other things, the copyright notice 22;; file named COPYING. Among other things, the copyright notice
20;; and this notice must be preserved on all copies. 23;; and this notice must be preserved on all copies.
21 24
25;;; Commentary:
22 26
27;;; Code:
23 28
24;; This file is autoloaded from calc.el. 29;; This file is autoloaded from calc.el.
25(require 'calc) 30(require 'calc)
@@ -121,8 +126,8 @@ Calc user interface as before (either M-# C or M-# K; initially M-# C)."
121 (calc-quit) 126 (calc-quit)
122 (calc nil calc-full-mode nil)))) 127 (calc nil calc-full-mode nil))))
123 (message (if calc-full-mode 128 (message (if calc-full-mode
124 "Now using full screen for Calc." 129 "Now using full screen for Calc"
125 "Now using partial screen for Calc.")))) 130 "Now using partial screen for Calc"))))
126 131
127(defun calc-other-window () 132(defun calc-other-window ()
128 "Invoke the Calculator in another window." 133 "Invoke the Calculator in another window."
@@ -630,8 +635,8 @@ loaded and the keystroke automatically re-typed."
630 ((equal a '(var inf var-inf)) t)) 635 ((equal a '(var inf var-inf)) t))
631 (> a 0))) 636 (> a 0)))
632 637
633(defalias math-fixnump 'integerp) 638(defalias 'math-fixnump 'integerp)
634(defalias math-fixnatnump 'natnump) 639(defalias 'math-fixnatnump 'natnump)
635 640
636 641
637;;; True if A is an even integer. [P R R] [Public] 642;;; True if A is an even integer. [P R R] [Public]
@@ -678,7 +683,7 @@ loaded and the keystroke automatically re-typed."
678 (math-scale-int (nth 1 a) (nth 2 a))) 683 (math-scale-int (nth 1 a) (nth 2 a)))
679 (t (calc-extensions) 684 (t (calc-extensions)
680 (math-trunc-fancy a)))) 685 (math-trunc-fancy a))))
681(defalias calcFunc-trunc 'math-trunc) 686(defalias 'calcFunc-trunc 'math-trunc)
682 687
683;;; Coerce A to be an integer (by truncation toward minus infinity). [I N] 688;;; Coerce A to be an integer (by truncation toward minus infinity). [I N]
684(defun math-floor (a &optional prec) ; [Public] 689(defun math-floor (a &optional prec) ; [Public]
@@ -693,7 +698,7 @@ loaded and the keystroke automatically re-typed."
693 (math-trunc a))) 698 (math-trunc a)))
694 (t (calc-extensions) 699 (t (calc-extensions)
695 (math-floor-fancy a)))) 700 (math-floor-fancy a))))
696(defalias calcFunc-floor 'math-floor) 701(defalias 'calcFunc-floor 'math-floor)
697 702
698 703
699(defun math-imod (a b) ; [I I I] [Public] 704(defun math-imod (a b) ; [I I I] [Public]
@@ -821,7 +826,7 @@ Prompts for bug subject. Leaves you in a mail buffer."
821 (mail nil calc-bug-address topic) 826 (mail nil calc-bug-address topic)
822 (goto-char (point-max)) 827 (goto-char (point-max))
823 (insert "\nIn Calc " calc-version ", Emacs " (emacs-version) "\n\n") 828 (insert "\nIn Calc " calc-version ", Emacs " (emacs-version) "\n\n")
824 (message (substitute-command-keys "Type \\[mail-send] to send bug report."))) 829 (message (substitute-command-keys "Type \\[mail-send] to send bug report")))
825(defalias calc-report-bug 'report-calc-bug) 830(defalias 'calc-report-bug 'report-calc-bug)
826 831
827;;; calc-misc.el ends here 832;;; calc-misc.el ends here