From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: comment-dwim on blank lines Date: Thu, 01 Nov 2007 21:14:00 -0400 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1193966059 17368 80.91.229.12 (2 Nov 2007 01:14:19 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 2 Nov 2007 01:14:19 +0000 (UTC) Cc: emacs-devel@gnu.org To: Glenn Morris Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Nov 02 02:14:22 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 1Inl75-0001eX-Vt for ged-emacs-devel@m.gmane.org; Fri, 02 Nov 2007 02:14:20 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Inl6w-0001kJ-1v for ged-emacs-devel@m.gmane.org; Thu, 01 Nov 2007 21:14:10 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Inl6t-0001iD-0V for emacs-devel@gnu.org; Thu, 01 Nov 2007 21:14:07 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Inl6r-0001g9-JI for emacs-devel@gnu.org; Thu, 01 Nov 2007 21:14:06 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Inl6r-0001g1-CL for emacs-devel@gnu.org; Thu, 01 Nov 2007 21:14:05 -0400 Original-Received: from tomts10.bellnexxia.net ([209.226.175.54] helo=tomts10-srv.bellnexxia.net) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Inl6n-0004m2-KZ; Thu, 01 Nov 2007 21:14:01 -0400 Original-Received: from pastel.home ([74.12.208.145]) by tomts10-srv.bellnexxia.net (InterMail vM.5.01.06.13 201-253-122-130-113-20050324) with ESMTP id <20071102011400.VQYW1733.tomts10-srv.bellnexxia.net@pastel.home>; Thu, 1 Nov 2007 21:14:00 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id 4540280CD; Thu, 1 Nov 2007 21:14:00 -0400 (EDT) In-Reply-To: (Glenn Morris's message of "Thu\, 01 Nov 2007 21\:09\:53 -0400") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/23.0.50 (gnu/linux) X-detected-kernel: by monty-python.gnu.org: Solaris 8 (1) 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:82332 Archived-At: > If comment-dwim is called on a non-blank line, it calls comment-indent > to do the work of either inserting or indenting a comment. On a blank > line, it does the work of inserting a new comment itself. Is there a > reason for this difference in behaviour? > It means that there isn't really any way for modes to customize what > comment-dwim does on blank lines, other than by abusing > indent-line-function. In particular, comment-insert-comment-function > does not get called, which seems to contradict its doc-string. It's clearly an oversight. comment-insert-comment-function was added due to a specific need and whoever implemented didn't look at other related cases. Feel free to fix it. Stefan