From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "William Xue" Newsgroups: gmane.emacs.devel Subject: Re: How to use c-style to comment a region? Date: Fri, 11 May 2007 10:10:09 +0800 Organization: wv Message-ID: References: <20070510223600.GA4176@muc.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; format=flowed; delsp=yes; charset=utf-8 Content-Transfer-Encoding: Quoted-Printable X-Trace: sea.gmane.org 1178849383 1766 80.91.229.12 (11 May 2007 02:09:43 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 11 May 2007 02:09:43 +0000 (UTC) Cc: emacs-devel@gnu.org To: "Alan Mackenzie" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri May 11 04:09:41 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1HmKZh-00086a-KM for ged-emacs-devel@m.gmane.org; Fri, 11 May 2007 04:09:41 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HmKh4-0004mx-C1 for ged-emacs-devel@m.gmane.org; Thu, 10 May 2007 22:17:18 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HmKh1-0004js-33 for emacs-devel@gnu.org; Thu, 10 May 2007 22:17:15 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HmKgz-0004hy-Uh for emacs-devel@gnu.org; Thu, 10 May 2007 22:17:14 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HmKgz-0004hk-R0 for emacs-devel@gnu.org; Thu, 10 May 2007 22:17:13 -0400 Original-Received: from wx-out-0506.google.com ([66.249.82.224]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1HmKZc-0004oh-71 for emacs-devel@gnu.org; Thu, 10 May 2007 22:09:36 -0400 Original-Received: by wx-out-0506.google.com with SMTP id s17so765816wxc for ; Thu, 10 May 2007 19:09:35 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:date:to:subject:from:organization:cc:content-type:mime-version:references:content-transfer-encoding:message-id:in-reply-to:user-agent; b=UndO2a4n9okENYaS96X+qgM5nC7q0nYq/vuLrEwjq5aiREdYpkyKXBxGalE9RY3k3cXVF8FBcuIgbJJIjpgOaKZKDl0/D+i/PkbDkpTvl9VJAwpVlxP7djKDWwJIMwmohmimIBeK5nralYVifm+yYBJLfd0xb6U8KYUL52kCxM4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:date:to:subject:from:organization:cc:content-type:mime-version:references:content-transfer-encoding:message-id:in-reply-to:user-agent; b=huPfGtlIeDftoXfJsfx5HwBkplBMgtJz2/x/L7NHnVFZeQ98aFJbityUxVKaZC07qhU5mYDn4nQ25d3pTEu45d5jaexSRvGeB78z4BLuYl0E8GTwcF+IG/fueU3U3NDeFXITMJDwF4U9j4GwEcdcf6vXwxRGvqmgQ2EAOzIlDh0= Original-Received: by 10.90.105.19 with SMTP id d19mr2480569agc.1178849375831; Thu, 10 May 2007 19:09:35 -0700 (PDT) Original-Received: from williamnb ( [222.92.124.222]) by mx.google.com with ESMTP id 6sm11644773agd.2007.05.10.19.09.34; Thu, 10 May 2007 19:09:35 -0700 (PDT) In-Reply-To: <20070510223600.GA4176@muc.de> User-Agent: Opera Mail/9.20 (Win32) X-detected-kernel: Linux 2.4-2.6 (Google crawlbot) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:70785 Archived-At: On Fri, 11 May 2007 05:14:02 +0800, Alan Mackenzie wrote: > Hi, William! > > On Thu, May 10, 2007 at 09:46:34AM +0800, William Xue wrote: >> Hi, > >> In cpp files, in following code, for e.g.: > >> ln_time_out.QuadPart =3D -((LONGLONG) 10 * 1000 * 1000 * 5); > >> I wanted to modify the second 1000 to 2000 for testing, but wanted to= >> keep the orignal value for restoring it later. > >> after selected 1000 and pressed C-c C-c : > >> ln_time_out.QuadPart =3D -((LONGLONG) 10 * 1000 * // = 1000 >> * 5); // 1 second > >> Can it be: > >> ln_time_out.QuadPart =3D -((LONGLONG) 10 * 1000 * /* = 1000 >> */ * 5); // 1 second > >> Maybe there are some settings for it, but I havn't found them. > > No, there aren't any such settings. > >> I know that add /* -*- C -*- */ at the beginning of the file can affe= ct >> the comment style for the whole file. >> That's not my request, I only want a command or a keybinding. > > No, you certainly wouldn't want to have to use C mode just to get the > right sort of comments. > > Some while ago, a CC Mode user requested a feature to toggle the type = of > comment that M-; inserts within C Mode (i.e. /* ... */ <-> // ... \n= ). > I intend to write a new command to do just this, probably binding it t= o > C-c C-;. This will hopefully get implemented in CC Mode 5.32, which I= am > hoping to release shortly after both Emacs 22.1 and GPLv3 are done. That's a good news for us. We'll wait for it! Thanks! :) > >> Thanks! > >> Sincerely yours, >> William > -- = Sincerely yours, William