> Uwe writes: > Ah, yes, but setq doesn't define a quantity - it is much less abstract: > it assigns a value to a variable. > Thanks for explaining, I was genuinely puzzled; you are using a > different definition of recursion than most people do, when it comes to > programming - where it is usually, implicitly about functions. I realised that there was a misunderstanding. I thought you and others suggest just to use (defun my-new-insert-subject-counter-old () "Insert a string of the form [`counter/Total'] " (interactive) (save-excursion (setq my-subject-counter (+ my-subject-counter 1)) (let ((total (read-string "Total number: " ))) (message-carefully-insert-headers (list (cons 'Subject (format "[%s/%s]" my-subject-counter total))))))) Without (defvar my-subject-counter 0) (or something like this.) As a matter of fact I deleted the defvar definition from my code and it still worked[1] but which puzzled me. So I thought (setq my-subject-counter (+ my-subject-counter 1)) defines and sets the variable in a recursive way, but it does not. You need a defvar (or a surrounding let). I only discovered my error misunderstanding when I restarted emacs and the code did not work anymore Sorry for the misunderstanding. Footnotes: [1] because it was already defined