From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Marcin Borkowski Newsgroups: gmane.emacs.devel Subject: Re: bug#21072: Brave new mark-defun (and a testing tool) Date: Thu, 16 Feb 2017 05:40:33 +0100 Message-ID: <87bmu2eoji.fsf@jane> References: <87o9ydrzkr.fsf@mbork.pl> <87mvdriuss.fsf@mbork.pl> <87bmu6icea.fsf@mbork.pl> <87wpctgieu.fsf@mbork.pl> <52e67f43-edcf-09e3-5fd6-6079763fd234@yandex.ru> <87tw7wh9sf.fsf@mbork.pl> <87k28sdka6.fsf@jane> <87efyze00g.fsf@jane> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1487220046 24368 195.159.176.226 (16 Feb 2017 04:40:46 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 16 Feb 2017 04:40:46 +0000 (UTC) User-Agent: mu4e 0.9.19; emacs 26.0.50.5 Cc: 21072@debbugs.gnu.org, emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Feb 16 05:40:39 2017 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ceDrx-0005gS-LR for ged-emacs-devel@m.gmane.org; Thu, 16 Feb 2017 05:40:37 +0100 Original-Received: from localhost ([::1]:44529 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ceDs3-00081M-BE for ged-emacs-devel@m.gmane.org; Wed, 15 Feb 2017 23:40:43 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33659) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ceDrV-00080l-02 for emacs-devel@gnu.org; Wed, 15 Feb 2017 23:40:09 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ceDrR-0004Hk-1d for emacs-devel@gnu.org; Wed, 15 Feb 2017 23:40:09 -0500 Original-Received: from mail.mojserwer.eu ([195.110.48.8]:39187) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ceDrQ-0004Hg-R5 for emacs-devel@gnu.org; Wed, 15 Feb 2017 23:40:04 -0500 Original-Received: from localhost (localhost [127.0.0.1]) by mail.mojserwer.eu (Postfix) with ESMTP id BC827E6A67; Thu, 16 Feb 2017 05:40:01 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at mail.mojserwer.eu Original-Received: from mail.mojserwer.eu ([127.0.0.1]) by localhost (mail.mojserwer.eu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id fbzBSvj2cMjc; Thu, 16 Feb 2017 05:39:56 +0100 (CET) Original-Received: from localhost (static-dwadziewiec-jedenpiec7.echostar.pl [109.232.29.157]) by mail.mojserwer.eu (Postfix) with ESMTPSA id 3B8E0E6279; Thu, 16 Feb 2017 05:39:55 +0100 (CET) In-reply-to: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 195.110.48.8 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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" Xref: news.gmane.org gmane.emacs.devel:212417 Archived-At: On 2017-02-15, at 20:27, Stefan Monnier wrote: >>> Regardless of the answer you give above, I'm wondering in which kind of >>> circumstance we'd want to test if we're on "a line containing only >>> a comment". >> You will be surprised, then, that I actually did use a very similar >> function in completely another circumstance: a command that counts >> source lines of code in a region, and excludes lines containing only >> whitespace, comments and docstrings. (Never mind the discussion about >> whether SLOC is meaningful in any sense;-).) > > My point is that it's not very frequent to need this exact definition of > a "comment line" and that there are various other possible definitions > one might need in other circumstances. > So at the very least, the doc should clarify which definition of > "comment line" it uses. Understood. Do you have then any better idea for the name of this function? beginning-of-defun--incomment-line-p seems to specific, in-comment-line-p _may_ be indeed too general. (I'll make the docstring more precise, of course.) Thank you all for looking at the patch, -- Marcin Borkowski