help-gnu-emacs
[Top][All Lists]
Advanced

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

underline with character e.g. '-' or '='


From: Brian Adkins
Subject: underline with character e.g. '-' or '='
Date: Tue, 13 May 2008 16:03:34 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux)

I often underline text with a hyphen or equal sign manually. I would
appreciate any info regarding how to accomplish this with a small elisp
function. Actually, if I had a function to compute the length of the
line, I think I would be all set.

For example, if I had the following line:

Section One

I would like to position the the cursor on the 'S' and invoke:
M-x underline-line-with-char

Which would prompte for a character in the minibuffer. If = was
supplied, the result would be:

Section One
===========

It seems like a simple task:
1) Prompt for a character
2) Compute the length of the line
3) Insert a line below the current line
4) Insert <length> number of characters

Thanks,
Brian Adkins


reply via email to

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