From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Davis Herring Newsgroups: gmane.emacs.devel Subject: Re: awesome feature (yet to be added?) Date: Mon, 05 May 2014 20:45:10 -0600 Organization: XCP-1 Message-ID: <53684CB6.1050601@lanl.gov> References: <112075085.1028629.1399142864865.open-xchange@email.1and1.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1399414119 1272 80.91.229.3 (6 May 2014 22:08:39 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 6 May 2014 22:08:39 +0000 (UTC) Cc: Bric , emacs-devel@gnu.org To: Le Wang Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed May 07 00:08:31 2014 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1WhnR6-00038f-RK for ged-emacs-devel@m.gmane.org; Wed, 07 May 2014 00:02:04 +0200 Original-Received: from localhost ([::1]:60839 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WhVNy-0007pC-1U for ged-emacs-devel@m.gmane.org; Mon, 05 May 2014 22:45:38 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:49021) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WhVNn-0007oy-J1 for emacs-devel@gnu.org; Mon, 05 May 2014 22:45:35 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WhVNf-0002n0-5F for emacs-devel@gnu.org; Mon, 05 May 2014 22:45:27 -0400 Original-Received: from proofpoint5.lanl.gov ([204.121.3.53]:44711) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WhVNe-0002jf-TM for emacs-devel@gnu.org; Mon, 05 May 2014 22:45:19 -0400 Original-Received: from mailrelay2.lanl.gov (mailrelay2.lanl.gov [128.165.4.103]) by mailgate5.lanl.gov (8.14.5/8.14.5) with ESMTP id s462jAtP009591; Mon, 5 May 2014 20:45:11 -0600 Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by mailrelay2.lanl.gov (Postfix) with ESMTP id F1775E8FC4C; Mon, 5 May 2014 20:45:10 -0600 (MDT) X-NIE-2-Virus-Scanner: amavisd-new at mailrelay2.lanl.gov Original-Received: from [128.165.123.145] (xray-r10.lanl.gov [128.165.123.145]) by mailrelay2.lanl.gov (Postfix) with ESMTP id E2BD6E8FC3D; Mon, 5 May 2014 20:45:10 -0600 (MDT) User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.18) Gecko/20110717 Lanikai/3.1.11 In-Reply-To: X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.11.96, 1.0.14, 0.0.0000 definitions=2014-05-06_01:2014-05-06, 2014-05-06, 1970-01-01 signatures=0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x X-Received-From: 204.121.3.53 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:171723 Archived-At: > Judging by the uptake. We are the only two to think this is useful. :) I thought about implementing `invert-comment' a few years ago, but I wasn't sure what to do about code like this: /* old_implementation_prepare (); */ /* old_implementation_go (); */ new_implementation_prepare (); /* The new implementation needs a buffer allocated. */ char *p = malloc (new_implementation_size ()); new_implementation_go (p); What to do about the actual comment embedded in the "new" code? x = foo () + /* bar () + */ baz (); quux (x, x + 1); /* quux now accounts for bar internally */ What does it mean to toggle commented-ness here? Your idea of markers likely works out better than "toggle the comments" because of cases like these. Davis -- This product is sold by volume, not by mass. If it appears too dense or too sparse, it is because mass-energy conversion has occurred during shipping.