New answers tagged

3

There are many ways to write loops/iterative/repetitive behaviour in elisp. C-hig (elisp)Iteration has the basic options, including dotimes, which is the canonical way to repeat something N times. E.g.: (dotimes (_ 10) (insert "X")) For the specific example of repeating a character N times, you might alternatively use make-string. (insert (make-string ...


3

If you want to insert the character interactively, do C-u 10 X. This will give you XXXXXXXXXX. This repeats the self-insert-command (here, for "X"), 10 times. See the manual node on repeating.


Top 50 recent answers are included