www.delorie.com/gnu/docs/calc/calc_352.html   search  
 
Buy the book!


GNU Emacs Calc 2.02 Manual

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

18.5.6.9 Keyboard Macros

If the separator symbol is macro, the first argument must be a string of characters which Calc can execute as a sequence of keystrokes. This switches into the Calc buffer for the duration of the macro. For example, `(calc-eval "vx5\rVR+" 'macro)' pushes the vector `[1,2,3,4,5]' on the stack and then replaces it with the sum of those numbers. Note that `\r' is the Lisp notation for the carriage-return, RET, character.

If your keyboard macro wishes to pop the stack, `\C-d' is safer than `\177' (the DEL character) because some installations may have switched the meanings of DEL and C-h. Calc always interprets C-d as a synonym for "pop-stack" regardless of key mapping.

If you provide a third argument to calc-eval, evaluation of the keyboard macro will leave a record in the Trail using that argument as a tag string. Normally the Trail is unaffected.

The return value in this case is always nil.

 

  webmaster     delorie software   privacy  
  Copyright 2003   by The Free Software Foundation     Updated Jun 2003