~ubuntu-branches/debian/squeeze/maxima/squeeze

« back to all changes in this revision

Viewing changes to src/mmacro.lisp

  • Committer: Bazaar Package Importer
  • Author(s): Camm Maguire
  • Date: 2010-04-30 13:30:33 UTC
  • mto: This revision was merged to the branch mainline in revision 12.
  • Revision ID: james.westby@ubuntu.com-20100430133033-wtewap0zdnmsix1y
Tags: upstream-5.21.1
ImportĀ upstreamĀ versionĀ 5.21.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
43
43
 
44
44
(defmspec mdefmacro (form) (setq form (cdr form))
45
45
          (cond ((or (null (cdr form)) (cdddr form))
46
 
                 (merror "Wrong number of args to ::= ~%~M"
 
46
                 (merror (intl:gettext "macro definition: must have exactly two arguments; found: ~M")
47
47
                         `((mdefmacro) ,@form))
48
48
                 )
49
49
                (t (mdefmacro1 (car form) (cadr form)))))
56
56
               (member 'array (cdar fun) :test #'eq)              
57
57
               (mopp (setq name ($verbify (caar fun))))
58
58
               (member name '($all $% $%% mqapply) :test #'eq))
59
 
           (merror "Illegal macro definition: ~M" ;ferret out all the
 
59
           (merror (intl:gettext "macro definition: illegal definition: ~M") ;ferret out all the
60
60
                   fun))                ;  illegal forms
61
61
          ((not (eq name (caar fun)))   ;efficiency hack I guess
62
62
           (rplaca (car fun) name)))    ;  done in jpg;mlisp
72
72
                  (mdefparam (cadr (car a))))
73
73
             (setq mlexprp t))
74
74
            (t 
75
 
             (merror "Illegal parameter in macro definition: ~M"
 
75
             (merror (intl:gettext "macro definition: bad argument: ~M")
76
76
                     (car a)))))
77
77
    (remove-transl-fun-props name)
78
78
    (add2lnc `((,name) ,@args) $macros)
122
122
     expansion)
123
123
    (($displace)
124
124
     (mmacro-displace form expansion))
125
 
    (t (mtell "warning: unrecognized value of 'macroexpansion'."))))
 
125
    (t (mtell (intl:gettext "warning: unrecognized value of 'macroexpansion'.")))))
126
126
 
127
127
 
128
128
(defun mmacro-displace (form expansion)
142
142
 
143
143
(defmspec $macroexpand (form) (setq form (cdr form))
144
144
          (cond ((or (null form) (cdr form))
145
 
                 (merror "`macroexpand' only takes one argument:~%~M"
 
145
                 (merror (intl:gettext "macroexpand: must have exactly one argument; found: ~M")
146
146
                         `(($macroexpand) ,@form)))
147
147
                (t (mmacroexpand (car form)))))
148
148
 
149
149
(defmspec $macroexpand1 (form) (setq form (cdr form))
150
150
          (cond ((or (null form) (cdr form))
151
 
                 (merror "`macroexpand' only takes one argument: ~%~M"
 
151
                 (merror (intl:gettext "macroexpand1: must have exactly one argument; found: ~M")
152
152
                         `(($macroexpand1) ,@form)))
153
153
                (t (mmacroexpand1 (car form)))))
154
154