LJ Archive

Listing 1. Macro to Interface to for Loops

"Bool: " C-space
    is one end of the region
C-u C-x q
C-x C-x
C-x r s a
C-a C-k
     should not be part of the buffer
"Iterator: "
     register b
"Value: "
     to register c
"for (bool "
     the for-loop
C-x r i a Insert the name of the boolean
"= " C-x r i b
C-e ".First(" C-x r i c
C-e "); " C-x r i a C-e ";
" C-x r i a C-e " = " C-x r i b C-e
".Next(" C-x r i c C-e ")) {" Return
"}"
LJ Archive