Go to the first, previous, next, last section, table of contents.

Invocation Macros

Calc provides one special keyboard macro, called up by M-# z (calc-user-invocation), that is intended to allow you to define your own special way of starting Calc. To define this "invocation macro," create the macro in the usual way with C-x ( and C-x ), then type Z I (calc-user-define-invocation). There is only one invocation macro, so you don't need to type any additional letters after Z I. From now on, you can type M-# z at any time to execute your invocation macro.

For example, suppose you find yourself often grabbing rectangles of numbers into Calc and multiplying their columns. You can do this by typing M-# r to grab, and V R : * to multiply columns. To make this into an invocation macro, just type C-x ( M-# r V R : * C-x ), then Z I. Then, to multiply a rectangle of data, just mark the data in its buffer in the usual way and type M-# z.

Invocation macros are treated like regular Emacs keyboard macros; all the special features described above for Z K-style macros do not apply. M-# z is just like C-x e, except that it uses the macro that was last stored by Z I. (In fact, the macro does not even have to have anything to do with Calc!)

The m m command saves the last invocation macro defined by Z I along with all the other Calc mode settings. See section General Mode Commands.


Go to the first, previous, next, last section, table of contents.