changeset 41267:e9718841a5b1

(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.
author Colin Walters <walters@gnu.org>
date Mon, 19 Nov 2001 07:36:42 +0000
parents c08a55ae8e5d
children ca690490ae62
files lisp/calc/calc-misc.el
diffstat 1 files changed, 15 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/calc/calc-misc.el	Mon Nov 19 07:35:49 2001 +0000
+++ b/lisp/calc/calc-misc.el	Mon Nov 19 07:36:42 2001 +0000
@@ -1,6 +1,9 @@
-;; Calculator for GNU Emacs, part I [calc-misc.el]
+;;; calc-misc.el --- miscellaenous 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.el.
 (require 'calc)
@@ -121,8 +126,8 @@
 	    (calc-quit)
 	    (calc nil calc-full-mode nil))))
     (message (if calc-full-mode
-		 "Now using full screen for Calc."
-	       "Now using partial screen for Calc."))))
+		 "Now using full screen for Calc"
+	       "Now using partial screen for Calc"))))
 
 (defun calc-other-window ()
   "Invoke the Calculator in another window."
@@ -630,8 +635,8 @@
 	    ((equal a '(var inf var-inf)) t))
     (> a 0)))
 
-(defalias math-fixnump 'integerp)
-(defalias math-fixnatnump 'natnump)
+(defalias 'math-fixnump 'integerp)
+(defalias 'math-fixnatnump 'natnump)
 
 
 ;;; True if A is an even integer.  [P R R] [Public]
@@ -678,7 +683,7 @@
 	 (math-scale-int (nth 1 a) (nth 2 a)))
 	(t (calc-extensions)
 	   (math-trunc-fancy a))))
-(defalias calcFunc-trunc 'math-trunc)
+(defalias 'calcFunc-trunc 'math-trunc)
 
 ;;; Coerce A to be an integer (by truncation toward minus infinity).  [I N]
 (defun math-floor (a &optional prec)    ;  [Public]
@@ -693,7 +698,7 @@
 	   (math-trunc a)))
 	(t (calc-extensions)
 	   (math-floor-fancy a))))
-(defalias calcFunc-floor 'math-floor)
+(defalias 'calcFunc-floor 'math-floor)
 
 
 (defun math-imod (a b)   ; [I I I] [Public]
@@ -821,7 +826,7 @@
   (mail nil calc-bug-address topic)
   (goto-char (point-max))
   (insert "\nIn Calc " calc-version ", Emacs " (emacs-version) "\n\n")
-  (message (substitute-command-keys "Type \\[mail-send] to send bug report.")))
-(defalias calc-report-bug 'report-calc-bug)
+  (message (substitute-command-keys "Type \\[mail-send] to send bug report")))
+(defalias 'calc-report-bug 'report-calc-bug)
 
 ;;; calc-misc.el ends here