[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

newbie elisp help ??

From: William Case
Subject: newbie elisp help ??
Date: Wed, 15 Aug 2007 13:27:53 -0400


I am trying to write a function that will insert a line of asterisks+
spaces across a buffer (as a section divider).  It was started as an
exercise and has become an exercise in futility.

I am working in the scratch pad using C-j to test the function as it is
being built.  I have:  (insert "* ").  It returns "* nil". Obviously I
don't want the "nil" to appear.  How do I get rid of it? 

More importantly to me, how do I get the (insert "* ") command to repeat
27 times to give me 54 characters across the buffer?  I know how to make
a recursive loop, but it seems to me this is a fairly common challenge
and there is a probably a function for repetition that I can't find.

I suppose I am asking for the programming equivalent of 'C-u n'.

'insert-char' allows for repeating but only one character at a time, not

Any guidance would be appreciated.

Regards Bill

reply via email to

[Prev in Thread] Current Thread [Next in Thread]