[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: inserting comment headings
From: |
Patrick Drechsler |
Subject: |
Re: inserting comment headings |
Date: |
Mon, 19 Jan 2004 23:57:25 +0100 |
User-agent: |
Gnus/5.110002 (No Gnus v0.2) Emacs/21.3.50 (gnu/linux) |
Kevin Rodgers wrote on 19 Jan 2004 23:38:33 MET:
> Patrick Drechsler wrote:
>
>> Tim X. wrote on 19 Jan 2004 09:35:45 MET:
[...]
>> [...M-;, M-j...]
>> Thanks for the answers, I already use these commands
>> frequently. But this is not quit what I was looking for.
>> I wanted to include the `-----------------' stuff after the
>> comment automatically:
>> ;;* comment -----------------------------------------------
>> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>> Any ideas?
>
>
> (defun insert-comment-heading (comment)
> "Insert COMMENT, preceded by \";;* \" and followed by \" ---...\"."
> (interactive "sComment: ")
> (insert ";;* " comment " " (make-string (- (window-width)
> (+ (length comment) 5)
> 1)
> ?-))
> (newline))
Cool! Thank you very much Kevin!
Now I just have to figure out how to let this function detect the
mode emacs is in. But I'll go ahead and try that on my own.
Cheers
Patrick
--
The shortest unit of time in the universe is the New York Second,
defined as the period of time between the traffic lights turning green
and the cab behind you honking. -- Terry Pratchett 'Lords and Ladies'
- inserting comment headings, Patrick Drechsler, 2004/01/18
- Re: inserting comment headings, leo, 2004/01/18
- Re: inserting comment headings, Kevin Rodgers, 2004/01/19
- Re: inserting comment headings,
Patrick Drechsler <=
- Re: inserting comment headings, Paolo Gianrossi, 2004/01/19
- Re: inserting comment headings, Brad Collins, 2004/01/20
- Message not available
- Re: inserting comment headings, Sean Richards, 2004/01/20
- Re: inserting comment headings, Paolo Gianrossi, 2004/01/20
- Re: inserting comment headings, Patrick Drechsler, 2004/01/20
Re: inserting comment headings, Stefan Monnier, 2004/01/20
Message not available