From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Will Farrington Newsgroups: gmane.emacs.devel Subject: Re: comment-dwim has no behavior to comment out the current line without a region Date: Tue, 9 Dec 2008 13:50:50 -0500 Message-ID: <972C2D7E-3A86-489B-AAE5-17A52B943DB3@gmail.com> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (Apple Message framework v929.2) Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1228848708 3936 80.91.229.12 (9 Dec 2008 18:51:48 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 9 Dec 2008 18:51:48 +0000 (UTC) Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Dec 09 19:52:53 2008 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 1LA7hV-0002CO-2n for ged-emacs-devel@m.gmane.org; Tue, 09 Dec 2008 19:52:53 +0100 Original-Received: from localhost ([127.0.0.1]:50167 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LA7gK-0000X4-41 for ged-emacs-devel@m.gmane.org; Tue, 09 Dec 2008 13:51:40 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LA7fc-0000I9-LS for emacs-devel@gnu.org; Tue, 09 Dec 2008 13:50:56 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LA7fb-0000HR-AJ for emacs-devel@gnu.org; Tue, 09 Dec 2008 13:50:56 -0500 Original-Received: from [199.232.76.173] (port=41247 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LA7fb-0000HL-04 for emacs-devel@gnu.org; Tue, 09 Dec 2008 13:50:55 -0500 Original-Received: from an-out-0708.google.com ([209.85.132.250]:54664) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LA7fa-0005xd-MA for emacs-devel@gnu.org; Tue, 09 Dec 2008 13:50:54 -0500 Original-Received: by an-out-0708.google.com with SMTP id c38so51208ana.21 for ; Tue, 09 Dec 2008 10:50:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:cc:message-id:from:to :in-reply-to:content-type:content-transfer-encoding:mime-version :subject:date:references:x-mailer; bh=zx6eHJXd9ZYD32MT5mihkFQjWPyRW0IvB1X4qbdYWuY=; b=vVmZXmX1dbBJUUGDViu8S3hlIaSWynS/xSNgGdVRjYvQRweQkEEPzzGsfqiWb4jADr WH9gJHUxkicjgmvHe+u7vaRoLQF0s4Pg6hDPV70tMHv226r98RAS6bDBDtps9yIPpyQ+ azsfg86OKQd3kYiWyK/GL13Eq7mPXMR1aYVtM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=cc:message-id:from:to:in-reply-to:content-type :content-transfer-encoding:mime-version:subject:date:references :x-mailer; b=fymB1pFcsuKaOQgpiojRkIDQJFnQuvEJ4vLOcv/pSTt44+2Phxi5XoND8ZJSpH4i0S g0gZBBxXnDBzx6FLmatt3JgFEDfeSJkjBq6w0QvosY11N0Sw2eFFDM5HjAXiAxzWlDFu ksJBHj3YLLo9vV7R2rWYvCSwUi8R/B1sJDF/U= Original-Received: by 10.101.68.19 with SMTP id v19mr420339ank.62.1228848653934; Tue, 09 Dec 2008 10:50:53 -0800 (PST) Original-Received: from lawn-128-61-25-5.lawn.gatech.edu (lawn-128-61-25-5.lawn.gatech.edu [128.61.25.5]) by mx.google.com with ESMTPS id c40sm480498anc.48.2008.12.09.10.50.52 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 09 Dec 2008 10:50:52 -0800 (PST) In-Reply-To: X-Mailer: Apple Mail (2.929.2) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) 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:106724 Archived-At: On Dec 9, 2008, at 1:40 PM, Stefan Monnier wrote: >> The proposed diff adds the following additional behavior: > >> If the point is at `line-beginning-position' (and the region is >> inactive), >> call `comment-region' >> on the whole line (unless the line consists of comments, in which >> case it calls `uncomment-region'). > > Sadly, BOL is a very common starting point to perform comment-indent, > which is what M-; does currently (and has done for ages) instead of > commenting out a region. > > So I don't think this new behavior is compatible with the current > use of > M-;. Generally speaking, what makes BOL a "common starting point" to perform comment-indent more-so than any other part of the line? Additionally, is not BOL semantically the clearest place to run comment-dwim and expect it to comment out a given line rather than having it run comment-indent?