From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Ankur Jain" Newsgroups: gmane.emacs.help Subject: Re: c-style comments in c++-mode Date: Tue, 13 Feb 2007 19:58:30 +0530 Message-ID: References: <45cf8c31$0$5718$9b4e6d93@newsspool3.arcor-online.net> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0314687715==" X-Trace: sea.gmane.org 1171376938 7811 80.91.229.12 (13 Feb 2007 14:28:58 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 13 Feb 2007 14:28:58 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: "Stefan Monnier" Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Feb 13 15:28:50 2007 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1HGyeI-0006Ce-2g for geh-help-gnu-emacs@m.gmane.org; Tue, 13 Feb 2007 15:28:50 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HGyeH-0002zc-KX for geh-help-gnu-emacs@m.gmane.org; Tue, 13 Feb 2007 09:28:49 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HGye3-0002z9-JT for help-gnu-emacs@gnu.org; Tue, 13 Feb 2007 09:28:35 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HGye2-0002yL-5w for help-gnu-emacs@gnu.org; Tue, 13 Feb 2007 09:28:35 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HGye2-0002yI-0s for help-gnu-emacs@gnu.org; Tue, 13 Feb 2007 09:28:34 -0500 Original-Received: from ug-out-1314.google.com ([66.249.92.172]) by monty-python.gnu.org with esmtp (Exim 4.52) id 1HGye1-0004Qv-GV for help-gnu-emacs@gnu.org; Tue, 13 Feb 2007 09:28:33 -0500 Original-Received: by ug-out-1314.google.com with SMTP id j3so1044448ugf for ; Tue, 13 Feb 2007 06:28:31 -0800 (PST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:references:x-google-sender-auth; b=WQhzjoX/PMcFjb4cU+tcmo+4kNe8N7UT9Sd2JBdIv0hozLkqCy8HUvo+m9TkddVXtwe7nY5rdvcnkNxQ4EW9OX0IpnLLLOKtZOGuyWoL5XOmbUBMAD+MxYs/JjrpQUrOpUEkI5zVD0WgdaYkd8ChOikB9PllvBEZ/gEnZBVoxRI= Original-Received: by 10.114.171.1 with SMTP id t1mr6620842wae.1171376910280; Tue, 13 Feb 2007 06:28:30 -0800 (PST) Original-Received: by 10.115.59.5 with HTTP; Tue, 13 Feb 2007 06:28:30 -0800 (PST) In-Reply-To: X-Google-Sender-Auth: 85b729d344d7e3f3 X-detected-kernel: Linux 2.4-2.6 (Google crawlbot) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:41168 Archived-At: --===============0314687715== Content-Type: multipart/alternative; boundary="----=_Part_67823_17716320.1171376910240" ------=_Part_67823_17716320.1171376910240 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Can we use both style of comments, somehow. I mean, instead of replacing c++ mode comments completely, can we assign keyboard shortcut for inserting c mode style comments? Or may be some other better method to use both styles. On 2/12/07, Stefan Monnier wrote: > > >>> What's the quickest way to tell c++-mode to insert c-style comments? > >> (add-hook 'c++-mode-hook > >> (lambda () (setq comment-start "/* ") (setq comment-end " > */"))) > > Or with a CC Mode style ... > > Probably, but I use too many major modes to be bothered to learn each and > every one's new idiosyncratic way to configure it. Especially since Emacs > provides perfectly good generic ways to do that. > > > Stefan > _______________________________________________ > help-gnu-emacs mailing list > help-gnu-emacs@gnu.org > http://lists.gnu.org/mailman/listinfo/help-gnu-emacs > -- Regards Ankur Jain http://ankurjain.org ------=_Part_67823_17716320.1171376910240 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline Can we use both style of comments, somehow.

I mean, instead of replacing c++ mode comments completely, can we assign keyboard shortcut for inserting c mode style comments? Or may be some other better method to use both styles.


On 2/12/07, Stefan Monnier <monnier@iro.umontreal.ca> wrote:
>>> What's the quickest way to tell c++-mode to insert c-style comments?
>> (add-hook 'c++-mode-hook
>>           (lambda () (setq comment-start "/* ") (setq comment-end " */")))
> Or with a CC Mode style ...

Probably, but I use too many major modes to be bothered to learn each and
every one's new idiosyncratic way to configure it.  Especially since Emacs
provides perfectly good generic ways to do that.


        Stefan
_______________________________________________
help-gnu-emacs mailing list
help-gnu-emacs@gnu.org
http://lists.gnu.org/mailman/listinfo/help-gnu-emacs



--
Regards
Ankur Jain

http://ankurjain.org ------=_Part_67823_17716320.1171376910240-- --===============0314687715== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ help-gnu-emacs mailing list help-gnu-emacs@gnu.org http://lists.gnu.org/mailman/listinfo/help-gnu-emacs --===============0314687715==--