From: Chmouel Boudjnah <chmouel@chmouel.com>
Subject: Re: command to insert comment in c mode
Date: Sun, 05 Jan 2003 02:46:48 +0100 [thread overview]
Message-ID: <uy960wepj.fsf@chmouel.com> (raw)
In-Reply-To: 3e176bde_4@nopics.sjc
kani <harazy@telocity.com> 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/
prev parent reply other threads:[~2003-01-05 1:46 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-01-04 20:20 command to insert comment in c mode kani
2003-01-04 23:48 ` Tim Haynes
2003-01-04 23:50 ` Alfred M. Szmidt
2003-01-05 1:46 ` Chmouel Boudjnah [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=uy960wepj.fsf@chmouel.com \
--to=chmouel@chmouel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).