From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Paolo Gianrossi Newsgroups: gmane.emacs.help Subject: Re: inserting comment headings Date: Mon, 19 Jan 2004 23:28:44 GMT Organization: [Infostrada] Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: <20040120002847.1ed89336.paolino.gnu@disi.unige.it> References: <87k73o9vz2.fsf@tiger.rapttech.com.au> <400C5C69.20000@yahoo.com> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1074555147 22301 80.91.224.253 (19 Jan 2004 23:32:27 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 19 Jan 2004 23:32:27 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Jan 20 00:32:18 2004 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1AiisU-0007uH-00 for ; Tue, 20 Jan 2004 00:32:18 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AiirV-0006a3-VY for geh-help-gnu-emacs@m.gmane.org; Mon, 19 Jan 2004 18:31:18 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!bloom-beacon.mit.edu!news2.telebyte.nl!newsfeed.stueberl.de!newsfeed01.sul.t-online.de!t-online.de!nntp.infostrada.it!twister1.libero.it.POSTED!not-for-mail Original-Newsgroups: gnu.emacs.help X-Newsreader: Sylpheed version 0.9.7claws (GTK+ 1.2.10; i686-pc-linux-gnu) Original-Lines: 40 Original-NNTP-Posting-Host: 151.38.226.214 Original-X-Complaints-To: abuse@net24.it Original-X-Trace: twister1.libero.it 1074554924 151.38.226.214 (Tue, 20 Jan 2004 00:28:44 MET) Original-NNTP-Posting-Date: Tue, 20 Jan 2004 00:28:44 MET Original-Xref: shelby.stanford.edu gnu.emacs.help:120239 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:16183 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:16183 On Mon, 19 Jan 2004 23:57:25 +0100 Patrick Drechsler wrote: > > 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. don't want to spoil your research :) but you might not need that... each mode defines comments... Won't say more if you don't ask, you might be having fun with this... cheers paolino