>>> "AS" == Adam Sjøgren writes: > Uwe writes: >>> (defun my-insert-add-counter () >>> (interactive) >>> (setq my-subject-counter (+ my-subject-counter 1)) >>> (insert (int-to-string my-subject-counter))) >> >> Thanks very much, recursion, sigh, I should have thought about it. > Where is the recursion? It's a global variable, right? Well the defined quantity my-subject-counter contains in its definition my-subject-counter (setq my-subject-counter 1) Is not recursive, but (setq my-subject-counter (+ my-subject-counter 1)) Looks a bit recursive to me.