From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Marcin Borkowski Newsgroups: gmane.emacs.bugs Subject: bug#21072: 24.5; inconsistent behaviour of `C-M-h (mark-defun)' in Emacs Lisp Date: Sun, 01 May 2016 19:49:36 +0200 Message-ID: <87y47tzn0v.fsf@mbork.pl> References: <55A74B3C.8030608@gmail.com> <87k2jm2bay.fsf@amu.edu.pl> <83r3dln1ez.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1462125042 27267 80.91.229.3 (1 May 2016 17:50:42 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 1 May 2016 17:50:42 +0000 (UTC) Cc: rfflrccrd@gmail.com, 21072@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun May 01 19:50:31 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1awvVm-00037L-3p for geb-bug-gnu-emacs@m.gmane.org; Sun, 01 May 2016 19:50:30 +0200 Original-Received: from localhost ([::1]:33804 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1awvVi-00033Q-9Z for geb-bug-gnu-emacs@m.gmane.org; Sun, 01 May 2016 13:50:26 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:41455) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1awvVZ-0002qG-Df for bug-gnu-emacs@gnu.org; Sun, 01 May 2016 13:50:24 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1awvVN-0000qr-IK for bug-gnu-emacs@gnu.org; Sun, 01 May 2016 13:50:11 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:48599) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1awvVN-0000op-EF for bug-gnu-emacs@gnu.org; Sun, 01 May 2016 13:50:05 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1awvVJ-0005oQ-Vj for bug-gnu-emacs@gnu.org; Sun, 01 May 2016 13:50:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Marcin Borkowski Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 01 May 2016 17:50:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 21072 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 21072-submit@debbugs.gnu.org id=B21072.146212498422313 (code B ref 21072); Sun, 01 May 2016 17:50:01 +0000 Original-Received: (at 21072) by debbugs.gnu.org; 1 May 2016 17:49:44 +0000 Original-Received: from localhost ([127.0.0.1]:60936 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1awvV2-0005np-H0 for submit@debbugs.gnu.org; Sun, 01 May 2016 13:49:44 -0400 Original-Received: from mail.mojserwer.eu ([195.110.48.8]:56267) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1awvV0-0005nh-FW for 21072@debbugs.gnu.org; Sun, 01 May 2016 13:49:42 -0400 Original-Received: from localhost (localhost [127.0.0.1]) by mail.mojserwer.eu (Postfix) with ESMTP id 2F113B24930; Sun, 1 May 2016 19:49:41 +0200 (CEST) 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 N-SdigJJkngG; Sun, 1 May 2016 19:49:37 +0200 (CEST) Original-Received: from localhost (98-171.echostar.pl [213.156.98.171]) by mail.mojserwer.eu (Postfix) with ESMTPSA id 80A3CB2492E; Sun, 1 May 2016 19:49:37 +0200 (CEST) User-agent: mu4e 0.9.13; emacs 25.1.50.9 In-reply-to: <83r3dln1ez.fsf@gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:117529 Archived-At: On 2016-05-01, at 19:17, Eli Zaretskii wrote: >> From: Marcin Borkowski >> Date: Mon, 25 Apr 2016 13:11:01 +0200 >> Cc: 21072@debbugs.gnu.org >> >> On 2015-07-16, at 08:12, Raffaele Ricciardi wrote: >> >> > Dear Emacs maintainers, >> > >> > the documentation for `mark-defun' says: >> > >> > The defun marked is the one that contains point or follows point. >> > >> > However, Emacs may mark the preceding defun instead, and it may >> > mark an unrelated preceding comment along with the defun. >> >> Confirmed on GNU Emacs 25.1.50.8 (commit 912e915). > > FWIW, I don't see why the behavior flagged "incorrect" is deemed > incorrect. It looks correct to me. In all of those examples point is > between 2 functions, so what exactly is "correct" is open to > discussion. > > Am I missing something? Yes. Here's a fragment from `mark-defun''s docstring: --8<---------------cut here---------------start------------->8--- Put mark at end of this defun, point at beginning. The defun marked is the one that contains point or follows point. --8<---------------cut here---------------end--------------->8--- And from the Emacs manual: --8<---------------cut here---------------start------------->8--- If you use the command while point is between defuns, it uses the following defun. --8<---------------cut here---------------end--------------->8--- So IMHO it's not "open to discussion" - the behavior is different than described in both the docstring (a bit implicitly) or in the manual (explicitly). Best, -- Marcin Borkowski http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski Faculty of Mathematics and Computer Science Adam Mickiewicz University