From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Chmouel Boudjnah Newsgroups: gmane.emacs.help Subject: Re: command to insert comment in c mode Date: Sun, 05 Jan 2003 02:46:48 +0100 Organization: "Chmouel Travels" Sender: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: References: <3e176bde_4@nopics.sjc> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1041731490 7115 80.91.224.249 (5 Jan 2003 01:51:30 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sun, 5 Jan 2003 01:51:30 +0000 (UTC) Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18Uzwm-0001qM-00 for ; Sun, 05 Jan 2003 02:51:28 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18UzwF-0001J2-04 for gnu-help-gnu-emacs@m.gmane.org; Sat, 04 Jan 2003 20:50:55 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news.uchicago.edu!newsswitch.lcs.mit.edu!newsfeed.cwix.com!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.freenet.de!newsfeed.stueberl.de!teaser.fr!noos.fr!not-for-mail Original-Newsgroups: gnu.emacs.help User-Agent: Gnus/5.090008 (Oort Gnus v0.08) Emacs/21.2 (i386-msvc-nt5.0.2195) Cancel-Lock: sha1:l2X3Y3WMniAHSX2ZAnZg7uxYHUM= Original-Lines: 23 Original-NNTP-Posting-Date: 05 Jan 2003 01:46:33 GMT Original-NNTP-Posting-Host: 81.66.120.150 Original-X-Trace: 1041731193 news.noos.fr 25745 81.66.120.150 Original-X-Complaints-To: abuse@noos.fr Original-Xref: shelby.stanford.edu gnu.emacs.help:108677 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:5206 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:5206 kani writes: > first of all, execuse the newbie question. is there is a command or to > insert a comment block in C mode ? that is, when i press key combination, a > /* and */ > are inserted and cursor left in the middle of comment block. M-; is the tip to make this automatically[1] set this in your .emacs to auto-fill automatically the comments (but not the code) : (defun my-c-mode-hook () (set (make-local-variable 'fill-nobreak-predicate) (lambda () (not (eq (get-text-property (point) 'face) 'font-lock-comment-face)))) ) (add-hook 'c-mode-hook 'my-c-mode-hook) Footnotes: [1] i guess i got this code from somewhere on http://www.emacswiki.org/ -- Chmouel -- http://www.chmouel.com/