home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Fresh Fish 8
/
FreshFishVol8-CD1.bin
/
gnu
/
info
/
calc.info-29
(
.txt
)
< prev
next >
Wrap
GNU Info File
|
1994-12-22
|
22KB
|
362 lines
This is Info file calc.info, produced by Makeinfo-1.55 from the input
file calc.texinfo.
This file documents Calc, the GNU Emacs calculator.
Copyright (C) 1990, 1991 Free Software Foundation, Inc.
Permission is granted to make and distribute verbatim copies of this
manual provided the copyright notice and this permission notice are
preserved on all copies.
Permission is granted to copy and distribute modified versions of
this manual under the conditions for verbatim copying, provided also
that the section entitled "GNU General Public License" is included
exactly as in the original, and provided that the entire resulting
derived work is distributed under the terms of a permission notice
identical to this one.
Permission is granted to copy and distribute translations of this
manual into another language, under the above conditions for modified
versions, except that the section entitled "GNU General Public License"
may be included in a translation approved by the author instead of in
the original English.
File: calc.info, Node: Installation, Next: Reporting Bugs, Prev: Programming, Up: Top
Installation
************
Calc 2.02 comes as a set of GNU Emacs Lisp files, with names like
`calc.el' and `calc-ext.el', and also as a `calc.texinfo' file which
can be used to generate both on-line and printed documentation.
To install Calc, just follow these simple steps. If you want more
information, each step is discussed at length in the sections below.
1. Change (`cd') to the Calc "home" directory. This directory was
created when you unbundled the Calc `.tar' or `.shar' file.
2. Type `make' to install Calc privately for your own use, or type
`make install' to install Calc system-wide. This will compile all
the Calc component files, modify your `.emacs' or the system-wide
`lisp/default' file to install Calc as appropriate, and format the
on-line Calc manual.
Both variants are shorthand for the following three steps:
* `make compile' to run the byte-compiler.
* `make private' or `make public', corresponding to `make' and
`make install', respectively. (If `make public' fails
because your system doesn't already have a `default' or
`default.el' file, use Emacs or the Unix `touch' command to
create a zero-sized one first.)
* `make info' to format the on-line Calc manual. This first
tries to use the `makeinfo' program; if that program is not
present, it uses the Emacs `texinfo-format-buffer' command
instead.
The Unix `make' utility looks in the file `Makefile' in the
current directory to see what Unix commands correspond to the
various "targets" like `install' or `public'. If your system
doesn't have `make', you will have to examine the `Makefile' and
type in the corresponding commands by hand.
3. If you ever move Calc to a new home directory, just give the `make
private' or `make public' command again in the new directory.
4. Test your installation as described at the end of these
instructions.
5. (Optional.) To print a hardcopy of the Calc manual (over 500
pages) or just the Calc Summary (about 20 pages), follow the
instructions under "Printed Documentation" below.
Calc is now installed and ready to go!
Upgrading from Calc 1.07
========================
If you have Calc version 1.07 or earlier, you will find that Calc 2.00
is organized quite differently. For one, Calc 2.00 is now distributed
already split into many parts; formerly this was done as part of the
installation procedure. Also, some new functions must be autoloaded
and the `M-#' key must be bound to `calc-dispatch' instead of to `calc'.
The easiest way to upgrade is to delete your old Calc files and then
install Calc 2.00 from scratch using the above instructions. You should
then go into your `.emacs' or `default' file and remove the old
`autoload' and `global-set-key' commands for Calc, since `make
public'/`make private' has added new, better ones.
See the `README' and `README.prev' files in the Calc distribution
for more information about what has changed since version 1.07.
(`README.prev' describes changes before 2.00, and is present only in
the FTP and tape versions of the distribution.)
The `make public' Command
=========================
If you are not the regular Emacs administrator on your system, your
account may not be allowed to execute the `make public' command, since
the system-wide `default' file may be write-protected. If this is the
case, you will have to ask your Emacs installer to execute this
command. (Just `cd' to the Calc home directory and type `make public'.)
The `make private' command adds exactly the same set of commands to
your `.emacs' file as `make public' adds to `default'. If your Emacs
installer is concerned about typing this command out of the blue, you
can ask her/him instead to copy the necessary text from your `.emacs'
file. (It will be marked by a comment that says "Commands added by
`calc-private-autoloads' on (date and time).")
Compilation
===========
Calc is written in a way that maximizes performance when its code has
been byte-compiled; a side effect is that performance is seriously
degraded if it *isn't* compiled. Thus, it is essential to compile the
Calculator before trying to use it. The function `calc-compile' in the
file `calc-maint.el' runs the Emacs byte-compiler on all the Calc source
files. (Specifically, it runs `M-x byte-compile-file' on all files in
the current directory with names of the form `calc*.el', and also on
the file `macedit.el'.)
If `calc-compile' finds that certain files have already been
compiled and have not been changed since, then it will not bother to
recompile those files.
The `calc-compile' command also pre-builds certain tables, such as
the units table (*note The Units Table::.) and the built-in rewrite
rules (*note Rearranging with Selections::.) which Calc would otherwise
need to rebuild every time those features were used.
The `make compile' shell command is simply a convenient way to start
an Emacs and give it a `calc-compile' command.
Auto-loading
============
To teach Emacs how to load in Calc when you type `M-#' for the first
time, add these lines to your `.emacs' file (if you are installing Calc
just for your own use), or the system's `lisp/default' file (if you are
installing Calc publicly). The `make private' and `make public'
commands, respectively, take care of this. (Note that `make' runs
`make private', and `make install' runs `make public'.)
(autoload 'calc-dispatch "calc" "Calculator Options" t)
(autoload 'full-calc "calc" "Full-screen Calculator" t)
(autoload 'full-calc-keypad "calc" "Full-screen X Calculator" t)
(autoload 'calc-eval "calc" "Use Calculator from Lisp")
(autoload 'defmath "calc" nil t t)
(autoload 'calc "calc" "Calculator Mode" t)
(autoload 'quick-calc "calc" "Quick Calculator" t)
(autoload 'calc-keypad "calc" "X windows Calculator" t)
(autoload 'calc-embedded "calc" "Use Calc from any buffer" t)
(autoload 'calc-embedded-activate "calc" "Activate =>'s in buffer" t)
(autoload 'calc-grab-region "calc" "Grab region of Calc data" t)
(autoload 'calc-grab-rectangle "calc" "Grab rectangle of data" t)
Unless you have installed the Calc files in Emacs' main `lisp/'
directory, you will also have to add a command that looks like the
following to tell Emacs where to find them. In this example, we have
put the files in directory `/usr/gnu/src/calc-2.00'.
(setq load-path (append load-path (list "/usr/gnu/src/calc-2.00")))
The `make public' and `make private' commands also do this (they use
the then-current directory as the name to add to the path). If you
move Calc to a new location, just repeat the `make public' or `make
private' command to have this new location added to the `load-path'.
The `autoload' command for `calc-dispatch' is what loads `calc.elc'
when you type `M-#'. It is the