user difined functions and the init file



Hello

using Maxima 5.9.1-9 under Debian with the emacs
maxima-mode
I want to define some user functions and make them
available to use 
at the Maxima command line under Linux, emacs
Maxima-mode.
after reading some paragraphs from the ref. manual and
in the User
Guide second edition userg.pdf by Macsyma Inc from
this link
http://www.cs.berkeley.edu/~fateman/macsyma/docs/
I could use some correction for what I did;

*create the maxima initialization file to auto load
when maxima
starts. please comment on the content of the next 2
files as I am very
new to maxima.

~/mac-init.mac
****************************************
/*
Maxima commands which you place in this file will be
executed each
time you execute the command INITIALZIE_MAXIMA();
which happens
automatically  whenever you start maxima.
to load this file any other time, issue this at the
maxima command:
load("mac-init.mac")$
*/

file_search_usage:ture$
file_search:cons("~/home/sam/maxima/",file_search)$
showtime:true$
load("~/maxima/myFun.mac")$
******************************************************


*create the file with user defined functions
~/maxima_fun/myFun.mac
***********************************
/*written by "Barton Willis"  on 
maxima mailing list*/
distance(p1,p2) := block([listarith : true],
  if listp(p1) and listp(p2) and length(p1) =
length(p2) then (
    p1 : map('cabs, p1-p2),
    sqrt(p1.p1))
  else error("The arguments to 'distance' must be
equal length 
lists"))
******************************************************


the following might help 
(%i20) describe(INITIALZIE_MAXIMA);

(%o20) 				     FALSE
(%i21) discribe(FILE_SEARCH);

(%o21) 			     discribe(FILE_SEARCH)
(%i22) discribe(FILE_SEARCH_USAGE);

(%o22)
discribe([/usr/share/maxima/5.9.1/share/##.{usg,texi},
/usr/share/maxim#

a/5.9.1/share/{affine,algebra,calculus,combinatorics,contrib,contrib/nset,cont#

rib/pdiff,diffequations,graphics,integequations,integration,macro,matrix,misc,#

numeric,physics,simplification,specfunctions,sym,tensor,trigonometry,utils,vec#

tor}/##.{usg,texi},
/usr/share/maxima/5.9.1/doc/##.{usg,texi}])
(%i23) 


		
__________________________________ 
Yahoo! Mail - PC Magazine Editors' Choice 2005 
http://mail.yahoo.com