GNU bug report logs - #24427
25.1.50; end-of-defun jumps too far

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: Marcin Borkowski <mbork@HIDDEN>; Keywords: patch; dated Tue, 13 Sep 2016 12:54:02 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.
Added tag(s) patch. Request was from Stefan Kangas <stefan@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at 24427 <at> debbugs.gnu.org:


Received: (at 24427) by debbugs.gnu.org; 17 Jun 2018 17:50:45 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Jun 17 13:50:44 2018
Received: from localhost ([127.0.0.1]:54060 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1fUbp6-0007h5-KH
	for submit <at> debbugs.gnu.org; Sun, 17 Jun 2018 13:50:44 -0400
Received: from mail-it0-f43.google.com ([209.85.214.43]:36185)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <npostavs@HIDDEN>) id 1fUbp4-0007gr-GP
 for 24427 <at> debbugs.gnu.org; Sun, 17 Jun 2018 13:50:42 -0400
Received: by mail-it0-f43.google.com with SMTP id j135-v6so9061082itj.1
 for <24427 <at> debbugs.gnu.org>; Sun, 17 Jun 2018 10:50:42 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=from:to:cc:subject:references:date:in-reply-to:message-id
 :user-agent:mime-version;
 bh=2KZcTvZ1hRUeAxfHGx0XACeTEubisjv1Apdv2JqUwWY=;
 b=HXbkay/D3SuVz1NcAbU9EWxX4ohJNinl7BYb34VlSLW5ZQ1j4/TfJo6W9MbgfSmfi0
 7lGx5MJihpbp6kFn3Hra9aAcKJRT2W/uuF1yYirB/c0QC4ulk4MKv+TU0gGvYf8Yw62h
 54vAzPUbgxRNM8Yxhvr/1K8uWcs6JgtaXj6jcyEJNnau34lI+X+xpVIlpRZceObJF215
 ESU8Xo93poJ4Z92x0mFs8/F4oFYPFaxnd+Z3lwAtuL2ZOy5lupnQ/RoAH0JSrYP0SwVl
 CbIrUDxROvdr8o9qeA/TB9FSs76/HuW80/XzJ/BsiSxj15j9uObR+WyfOGaUuM89j/Hq
 xv6w==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to
 :message-id:user-agent:mime-version;
 bh=2KZcTvZ1hRUeAxfHGx0XACeTEubisjv1Apdv2JqUwWY=;
 b=LQX6n26HXOH2eCt+5QssmU226gOXWqMCylcWbJr/PqPzG6GGZMVLSzRIEgzJSwnExW
 7lsjAQ47j/iczOBSXlqk0NAZ8gug7ruLzDkfkmu0m8tgGWVvRj/51GsLob4BmAIaNBhn
 7k54xWzzWpP9HdZomGbrND2sMeTdkpNH3FzyS+NbMv4IuPHAIIXzodjUZcCT47QVsoBC
 dPb0kGZmQssUnFCPbBwhFzPsRZmnJi33OZ37r4gDU1TuhMaE0ZLw1V0NLttUeVcoCbEM
 9AsnfAEFKl4CNLHy0QB1Hp1xSJoRzkYLW11E9efp60JdUFhImpZnC1Y9QEPlwQulNxj5
 7H6w==
X-Gm-Message-State: APt69E1LbeW48UiPFV04lSzaE3xedA5Hym1sasg7Zhhyw+DA/3X81vVx
 oNX5yKQRH57OfIwpydjDRoEDjA==
X-Google-Smtp-Source: ADUXVKLMc1iTfefCS2LBp5xEDDjfMM+WGeg4sITZ0zzWKStK7Jo4m4xKf9oP2Xrh4PbhMajsX5fwXw==
X-Received: by 2002:a24:f502:: with SMTP id k2-v6mr7745951ith.1.1529257836790; 
 Sun, 17 Jun 2018 10:50:36 -0700 (PDT)
Received: from zebian (cbl-45-2-119-34.yyz.frontiernetworks.ca. [45.2.119.34])
 by smtp.googlemail.com with ESMTPSA id
 g6-v6sm2921411iti.0.2018.06.17.10.50.35
 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);
 Sun, 17 Jun 2018 10:50:35 -0700 (PDT)
From: Noam Postavsky <npostavs@HIDDEN>
To: Robert Cochran <robert-emacs@HIDDEN>
Subject: Re: bug#24427: 25.1.50; end-of-defun jumps too far
References: <87fup4q7ut.fsf@HIDDEN> <87d1k7a6lo.fsf@HIDDEN>
 <8760pza6g2.fsf@HIDDEN> <871t0etod0.fsf@HIDDEN>
 <87twd9vxaj.fsf@HIDDEN> <87r38cw7bp.fsf@HIDDEN>
 <8737kftjv5.fsf@HIDDEN>
Date: Sun, 17 Jun 2018 13:50:34 -0400
In-Reply-To: <8737kftjv5.fsf@HIDDEN> (Robert Cochran's message of
 "Sat, 01 Oct 2016 22:12:14 -0700")
Message-ID: <87bmc9ti8l.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux)
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 24427
Cc: 24427 <at> debbugs.gnu.org, Marcin Borkowski <mbork@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

--=-=-=
Content-Type: text/plain

Robert Cochran <robert-emacs@HIDDEN> writes:

> Nothing has come to mind for a method to fix it without breaking other
> things. Perhaps the solution is obvious for someone else? Suggestions
> would be nice if you have them.

Not entirely sure if this is correct, but the patch below seems to fix
it for me, without breaking any of the previously mentioned scenarios.
I find the fact that end-of-defun goes to the line following the closing
paren a bit dubious, though I guess since it's been that way so long, we
can hardly change it now.


--=-=-=
Content-Type: text/x-diff
Content-Disposition: inline;
 filename=v1-0001-Fix-end-of-defun-N-for-N-2-Bug-24427.patch
Content-Description: patch

From 111ea54ce469d7e601c0e7c2b48d1748021e71a6 Mon Sep 17 00:00:00 2001
From: Noam Postavsky <npostavs@HIDDEN>
Date: Sun, 17 Jun 2018 13:29:37 -0400
Subject: [PATCH v1] Fix (end-of-defun N) for N >= 2 (Bug#24427)

* lisp/emacs-lisp/lisp.el (end-of-defun): Only skip to next line when
after end of defun when ARG is 1 or less.
* test/lisp/emacs-lisp/lisp-tests.el (end-of-defun-twice): New test.
---
 lisp/emacs-lisp/lisp.el            |  3 ++-
 test/lisp/emacs-lisp/lisp-tests.el | 55 ++++++++++++++++++++++++++++++++++++++
 2 files changed, 57 insertions(+), 1 deletion(-)

diff --git a/lisp/emacs-lisp/lisp.el b/lisp/emacs-lisp/lisp.el
index 5a89923f8f..67e7b3ef7b 100644
--- a/lisp/emacs-lisp/lisp.el
+++ b/lisp/emacs-lisp/lisp.el
@@ -481,7 +481,8 @@ end-of-defun
 		  (if (looking-at "\\s<\\|\n")
 		      (forward-line 1))))))
     (funcall end-of-defun-function)
-    (funcall skip)
+    (when (<= arg 1)
+      (funcall skip))
     (cond
      ((> arg 0)
       ;; Moving forward.
diff --git a/test/lisp/emacs-lisp/lisp-tests.el b/test/lisp/emacs-lisp/lisp-tests.el
index 07eddb74d5..3c87879c3f 100644
--- a/test/lisp/emacs-lisp/lisp-tests.el
+++ b/test/lisp/emacs-lisp/lisp-tests.el
@@ -367,6 +367,61 @@ elisp-tests-with-temp-buffer
 "
     "Test buffer for `mark-defun'."))
 
+;;; end-of-defun
+
+(ert-deftest end-of-defun-twice ()
+  "Test behavior of prefix arg for `end-of-defun' (Bug#24427).
+Calling `end-of-defun' twice should be the same as a prefix arg
+of two."
+  (setq last-command nil)
+  (cl-flet ((eod2 (lambda ()
+                    (goto-char (point-min))
+                    (end-of-defun)
+                    (end-of-defun)
+                    (let ((pt-eod2 (point)))
+                      (goto-char (point-min))
+                      (end-of-defun 2)
+                      (should (= (point) pt-eod2))))))
+    (with-temp-buffer
+      (insert "\
+\(defun a ())
+
+\(defun b ())
+
+\(defun c ())")
+      (eod2))
+    (with-temp-buffer
+      (insert "\
+\(defun a ())
+\(defun b ())
+\(defun c ())")
+      (eod2)))
+  (elisp-tests-with-temp-buffer ";; Comment header
+
+\(defun func-1 (arg)
+  \"docstring\"
+  body)
+=!p1=
+;; Comment before a defun
+\(defun func-2 (arg)
+  \"docstring\"
+  body)
+
+\(defun func-3 (arg)
+  \"docstring\"
+  body)
+=!p2=(defun func-4 (arg)
+  \"docstring\"
+  body)
+
+;; end
+"
+    (goto-char p1)
+    (end-of-defun 2)
+    (should (= (point) p2))))
+
+;;; mark-defun
+
 (ert-deftest mark-defun-no-arg-region-inactive ()
   "Test `mark-defun' with no prefix argument and inactive
 region."
-- 
2.11.0


--=-=-=--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#24427; Package emacs. Full text available.

Message received at 24427 <at> debbugs.gnu.org:


Received: (at 24427) by debbugs.gnu.org; 2 Oct 2016 05:12:31 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Oct 02 01:12:31 2016
Received: from localhost ([127.0.0.1]:41442 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1bqZ4h-0000Ha-AT
	for submit <at> debbugs.gnu.org; Sun, 02 Oct 2016 01:12:31 -0400
Received: from mail.workgrouplinux.net ([207.195.177.82]:55162)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <robert-emacs@HIDDEN>) id 1bqZ4e-0000HP-Vw
 for 24427 <at> debbugs.gnu.org; Sun, 02 Oct 2016 01:12:29 -0400
DKIM-Signature: v=1; a=rsa-sha1; c=simple; d=cochranmail.com; h=from:to
 :cc:subject:references:date:in-reply-to:message-id:mime-version
 :content-type; s=dkim1; bh=I62tiJpO03PfNF/wv6iXdsbI7S0=; b=rb4Iu
 kfjSqxTn4nT4IBh8nMVCjERdB6PrFdnZyTHzTiMuy6MCujjrbhuRkhYU43DA+LEq
 S34s1TN1T29U3PHxnEG4cEbpIEtHG4+H5azdryCrlLQQJ60wv6zXdtQ0TwnGm+cF
 o40lE1mzkjMMEJ4dlyu3WqEmUitAdDTZsW/73AelQudTtK8tc++0Ig2l9kASbkNI
 H/xgPNSvt2IYEsSm9dCB78XCDNLSOZ8st1pwF/OiBkCkxxBFoeBdk/66GuW+fShO
 x4x0YF/S3lDDtbWZab+5fgodGqW6QBwAv6b0c8uYMXaieTBNJ+SlpkHrlKJp4F57
 PYOJpyOG5FM4CyYeg==
Received: (qmail 9374 invoked by uid 0); 2 Oct 2016 05:12:26 -0000
Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys
DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=private; d=cochranmail.com;
 b=hRE6Li8eEQsQIHDXIE0hDnhcwXb0B2f5eTd1QFtwpJV5V2cpkfPkRXzr9+gwJWtDIE+SNRCdfihi6iuU0CTbtg==;
Received: from 131-191-86-130.as.clicknet.org (HELO SoraLaptop)
 (robert@HIDDEN@131.191.86.130)
 by mail.cochrantribe.org with ESMTPA; 2 Oct 2016 05:12:26 -0000
From: Robert Cochran <robert-emacs@HIDDEN>
To: Marcin Borkowski <mbork@HIDDEN>
Subject: Re: bug#24427: 25.1.50; end-of-defun jumps too far
References: <87fup4q7ut.fsf@HIDDEN> <87d1k7a6lo.fsf@HIDDEN>
 <8760pza6g2.fsf@HIDDEN> <871t0etod0.fsf@HIDDEN>
 <87twd9vxaj.fsf@HIDDEN> <87r38cw7bp.fsf@HIDDEN>
Date: Sat, 01 Oct 2016 22:12:14 -0700
In-Reply-To: <87r38cw7bp.fsf@HIDDEN> (Marcin Borkowski's message of "Thu, 22
 Sep 2016 12:35:22 +0200")
Message-ID: <8737kftjv5.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 24427
Cc: 24427 <at> debbugs.gnu.org, Robert Cochran <robert-emacs@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 0.0 (/)

Marcin Borkowski <mbork@HIDDEN> writes:

> OK, so here's the problem I found when running my personal tests for my
> `mark-defun'.
>
> Consider this Elisp buffer:
>
> ;; Comment header
>
> (defun func-1 (arg)
>   "docstring"
>   body)
> -!-
> ;; Comment before a defun
> (defun func-2 (arg)
>   "docstring"
>   body)
>
> (defun func-3 (arg)
>   "docstring"
>   body)
> (defun func-4 (arg)
>   "docstring"
>   body)
>
> ;; end
>
> where -!- means the point location.  Now press C-u 2 C-M-e, and you
> moved by one defun instead of two.

This particular problem is the result of this bit in the body of
`end-of-defun`:

#+BEGIN_SRC emacs-lisp
(if (> (point) pos)
    ;; We already moved forward by one because we started from
    ;; within a function.
    (setq arg (1- arg))
  ;; We started from after the end of the previous function.
  (goto-char pos))
#+END_SRC

When the whitespace is skipped after doing the initial position
calculations, point, which ends up either on or after the

> ;; Comment before a defun

line, is indeed after `pos`, a recording of point before doing any
movement. The assumption that we were in a function body, as stated in
the comment, doesn't hold. So the definition count is erroneously
decreased.

Nothing has come to mind for a method to fix it without breaking other
things. Perhaps the solution is obvious for someone else? Suggestions
would be nice if you have them.

(As an aside, to vent a little, it's rather frustrating that both pre-
and post-patch do what you regard as TRT in different
circumstances. Especially so because pre-patch is only doing TRT as a
result of what I would say is two bugs canceling each other
out. Obviously not your fault, but still frustrating.)

Thanks,
-- 
~Robert Cochran

GPG Fingerprint - E778 2DD4 FEA6 6A68 6F26  AD2D E5C3 EB36 4886 8871




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#24427; Package emacs. Full text available.

Message received at 24427 <at> debbugs.gnu.org:


Received: (at 24427) by debbugs.gnu.org; 22 Sep 2016 10:35:26 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Sep 22 06:35:26 2016
Received: from localhost ([127.0.0.1]:60256 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1bn1Li-00023s-KL
	for submit <at> debbugs.gnu.org; Thu, 22 Sep 2016 06:35:26 -0400
Received: from mail.mojserwer.eu ([195.110.48.8]:60122)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <mbork@HIDDEN>) id 1bn1Lg-00023h-0n
 for 24427 <at> debbugs.gnu.org; Thu, 22 Sep 2016 06:35:24 -0400
Received: from localhost (localhost [127.0.0.1])
 by mail.mojserwer.eu (Postfix) with ESMTP id A0A031D6005;
 Thu, 22 Sep 2016 12:35:20 +0200 (CEST)
X-Virus-Scanned: Debian amavisd-new at mail.mojserwer.eu
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 umJ9Wf2fukks; Thu, 22 Sep 2016 12:35:18 +0200 (CEST)
Received: from localhost (unknown [212.2.101.53])
 by mail.mojserwer.eu (Postfix) with ESMTPSA id 67AAC1D6004;
 Thu, 22 Sep 2016 12:35:15 +0200 (CEST)
References: <87fup4q7ut.fsf@HIDDEN> <87d1k7a6lo.fsf@HIDDEN>
 <8760pza6g2.fsf@HIDDEN> <871t0etod0.fsf@HIDDEN>
 <87twd9vxaj.fsf@HIDDEN>
User-agent: mu4e 0.9.17; emacs 25.1.50.6
From: Marcin Borkowski <mbork@HIDDEN>
To: Robert Cochran <robert-emacs@HIDDEN>
Subject: Re: bug#24427: 25.1.50; end-of-defun jumps too far
In-reply-to: <87twd9vxaj.fsf@HIDDEN>
Date: Thu, 22 Sep 2016 12:35:22 +0200
Message-ID: <87r38cw7bp.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 24427
Cc: 24427 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.7 (/)


On 2016-09-21, at 21:59, Marcin Borkowski <mbork@HIDDEN> wrote:

> On 2016-09-20, at 20:31, Robert Cochran <robert-emacs@HIDDEN> wrote:
>
>> Ping!
>>
>> Has anyone had the opportunity to look over this?
>
> Hi,
>
> I'm extremely busy right now, but I looked into it and it seemed to
> break some other tests of mine.  I haven't yet found the problem (or
> even confirmed it), but I expect to have some time for it in the next
> few days.

OK, so here's the problem I found when running my personal tests for my
`mark-defun'.

Consider this Elisp buffer:

--8<---------------cut here---------------start------------->8---
;; Comment header

(defun func-1 (arg)
  "docstring"
  body)
-!-
;; Comment before a defun
(defun func-2 (arg)
  "docstring"
  body)

(defun func-3 (arg)
  "docstring"
  body)
(defun func-4 (arg)
  "docstring"
  body)

;; end
--8<---------------cut here---------------end--------------->8---

where -!- means the point location.  Now press C-u 2 C-M-e, and you
moved by one defun instead of two.

Best,

-- 
Marcin Borkowski




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#24427; Package emacs. Full text available.

Message received at 24427 <at> debbugs.gnu.org:


Received: (at 24427) by debbugs.gnu.org; 21 Sep 2016 19:59:42 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Sep 21 15:59:42 2016
Received: from localhost ([127.0.0.1]:59962 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1bmngE-00046k-FN
	for submit <at> debbugs.gnu.org; Wed, 21 Sep 2016 15:59:42 -0400
Received: from mail.mojserwer.eu ([195.110.48.8]:51455)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <mbork@HIDDEN>) id 1bmngC-00046b-OF
 for 24427 <at> debbugs.gnu.org; Wed, 21 Sep 2016 15:59:41 -0400
Received: from localhost (localhost [127.0.0.1])
 by mail.mojserwer.eu (Postfix) with ESMTP id 54289E665E;
 Wed, 21 Sep 2016 21:59:39 +0200 (CEST)
X-Virus-Scanned: Debian amavisd-new at mail.mojserwer.eu
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 fc6rS-Ejzv-E; Wed, 21 Sep 2016 21:59:37 +0200 (CEST)
Received: from localhost (static-dwadziewiec-jedenpiec7.echostar.pl
 [109.232.29.157])
 by mail.mojserwer.eu (Postfix) with ESMTPSA id 1DE77E6648;
 Wed, 21 Sep 2016 21:59:37 +0200 (CEST)
References: <87fup4q7ut.fsf@HIDDEN> <87d1k7a6lo.fsf@HIDDEN>
 <8760pza6g2.fsf@HIDDEN> <871t0etod0.fsf@HIDDEN>
User-agent: mu4e 0.9.17; emacs 25.1.50.6
From: Marcin Borkowski <mbork@HIDDEN>
To: Robert Cochran <robert-emacs@HIDDEN>
Subject: Re: bug#24427: 25.1.50; end-of-defun jumps too far
In-reply-to: <871t0etod0.fsf@HIDDEN>
Date: Wed, 21 Sep 2016 21:59:48 +0200
Message-ID: <87twd9vxaj.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 24427
Cc: 24427 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.7 (/)


On 2016-09-20, at 20:31, Robert Cochran <robert-emacs@HIDDEN> wrote:

> Ping!
>
> Has anyone had the opportunity to look over this?

Hi,

I'm extremely busy right now, but I looked into it and it seemed to
break some other tests of mine.  I haven't yet found the problem (or
even confirmed it), but I expect to have some time for it in the next
few days.

Anyway, thanks for looking into it in the first place!

> TIA,

Stay tuned and best regards,

-- 
Marcin Borkowski




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#24427; Package emacs. Full text available.

Message received at 24427 <at> debbugs.gnu.org:


Received: (at 24427) by debbugs.gnu.org; 20 Sep 2016 18:31:21 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Sep 20 14:31:21 2016
Received: from localhost ([127.0.0.1]:58466 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1bmPpB-0001HV-Dw
	for submit <at> debbugs.gnu.org; Tue, 20 Sep 2016 14:31:21 -0400
Received: from mail.workgrouplinux.net ([207.195.177.82]:45104)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <robert-emacs@HIDDEN>) id 1bmPp9-0001HM-4K
 for 24427 <at> debbugs.gnu.org; Tue, 20 Sep 2016 14:31:19 -0400
DKIM-Signature: v=1; a=rsa-sha1; c=simple; d=cochranmail.com; h=from:to
 :cc:subject:references:date:in-reply-to:message-id:mime-version
 :content-type; s=dkim1; bh=9+4lDDVhhkDs2ENR8IUxsdnyEV0=; b=JfDYB
 zWcJQSQKyrq8T0DOVVLhwj6i1MtSKD3IHU3nYGzYwEUtWJKX2S4DNpQz6Xk3r8Dk
 /6Im3r4Bf2FRFUyrBC0lTysR5MRxSoaDqM9/fc7ZWt35SBGgsUnZs1HvBhwG4Bvs
 IVqXMfkRNvD6dTrEiBiPfgFxdB+vAm4zg3PNAkJOOzOSdnQi697tt7toKqRr6Xfr
 cQEe0GoE2gTIuC9+KQ5/MVgFZK8i36x3YnudSMyz6fsHIUg+s+nThJa5fnhGLpFB
 /+CqbCWxt8UUINzIeV+NPO9WpowAthXX/qxbuQcafxSXTiwuMUOHX5TS5jScYzEa
 ifZtfPisrbJUqnqcQ==
Received: (qmail 30337 invoked by uid 0); 20 Sep 2016 18:31:16 -0000
Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys
DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=private; d=cochranmail.com;
 b=raM3QqyMdXjmleE/8gls7QX3j3Ygy+VfDVvAe9ftM4Eu+jbl+6juE8sanm53IWRP+mfzPnNaJ9kL6hoxaFy6Jw==;
Received: from 74-93-99-217-washington.hfc.comcastbusiness.net (HELO
 SoraLaptop) (robert@HIDDEN@74.93.99.217)
 by mail.cochrantribe.org with ESMTPA; 20 Sep 2016 18:31:16 -0000
From: Robert Cochran <robert-emacs@HIDDEN>
To: Robert Cochran <robert-emacs@HIDDEN>
Subject: Re: bug#24427: 25.1.50; end-of-defun jumps too far
References: <87fup4q7ut.fsf@HIDDEN> <87d1k7a6lo.fsf@HIDDEN>
 <8760pza6g2.fsf@HIDDEN>
Date: Tue, 20 Sep 2016 11:31:07 -0700
In-Reply-To: <8760pza6g2.fsf@HIDDEN> (Robert Cochran's message of
 "Tue, 13 Sep 2016 13:30:21 -0700")
Message-ID: <871t0etod0.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 24427
Cc: 24427 <at> debbugs.gnu.org, Marcin Borkowski <mbork@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 0.0 (/)

Ping!

Has anyone had the opportunity to look over this?

TIA,
-- 
~Robert Cochran

GPG Fingerprint - E778 2DD4 FEA6 6A68 6F26  AD2D E5C3 EB36 4886 8871




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#24427; Package emacs. Full text available.

Message received at 24427 <at> debbugs.gnu.org:


Received: (at 24427) by debbugs.gnu.org; 13 Sep 2016 20:30:25 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Sep 13 16:30:25 2016
Received: from localhost ([127.0.0.1]:58942 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1bjuLZ-0002nd-Fq
	for submit <at> debbugs.gnu.org; Tue, 13 Sep 2016 16:30:25 -0400
Received: from mail.workgrouplinux.net ([207.195.177.82]:51426)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <robert-emacs@HIDDEN>) id 1bjuLX-0002nT-NS
 for 24427 <at> debbugs.gnu.org; Tue, 13 Sep 2016 16:30:24 -0400
DKIM-Signature: v=1; a=rsa-sha1; c=simple; d=cochranmail.com; h=from:to
 :cc:subject:references:date:in-reply-to:message-id:mime-version
 :content-type; s=dkim1; bh=d/+EagsOncBUSLFw0TOYXx/xa8k=; b=VErnZ
 FyzT/w+fHXaAQ/0GlnBiKO5gKpQX7tJZ6OjDVWTzMM2TWH64GHHFTiJvW5DotkqN
 jzeMpNhs1jGp9KEmI9PngQqD3p8O4szvzGk/yMLG24ogMBb1aNxgWU80fIxTyXWY
 jGZkCdaPZqouNXjBESovFHZEdArb03UE1Af2ckcnra3Blu3qXebvfOS6Z37EeV+r
 SBD+bBfmzuTQuT7nIBPyt2Vp2OGAtVT/hNmBsbpFDNCRtLkrXJeE4x8xVjb4i0Mb
 6itnP0NVcV7Y0ZC7EOKDZd5BDh1dC6d2kyfxqJoof1zROTqLIn03dLHapexW+5Yk
 kmV/0wrT6GzpT0mHA==
Received: (qmail 24936 invoked by uid 0); 13 Sep 2016 20:30:22 -0000
Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys
DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=private; d=cochranmail.com;
 b=E2Y5Z/cdUksun25cme0LwpPuf7VMSh4QT9E4ym/jdgWd4KT5v34lFFWSOlTzK6/Wa33eiTuIFiHjNnnchAbubw==;
Received: from 74-93-99-217-washington.hfc.comcastbusiness.net (HELO
 SoraLaptop) (robert@HIDDEN@74.93.99.217)
 by mail.cochrantribe.org with ESMTPA; 13 Sep 2016 20:30:22 -0000
From: Robert Cochran <robert-emacs@HIDDEN>
To: Robert Cochran <robert-emacs@HIDDEN>
Subject: Re: bug#24427: 25.1.50; end-of-defun jumps too far
References: <87fup4q7ut.fsf@HIDDEN> <87d1k7a6lo.fsf@HIDDEN>
Date: Tue, 13 Sep 2016 13:30:21 -0700
In-Reply-To: <87d1k7a6lo.fsf@HIDDEN> (Robert Cochran's message of
 "Tue, 13 Sep 2016 13:26:59 -0700")
Message-ID: <8760pza6g2.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 24427
Cc: 24427 <at> debbugs.gnu.org, Marcin Borkowski <mbork@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 0.0 (/)

--=-=-=
Content-Type: text/plain

Oops, didn't double-space the sentence ending (again!). Fixed in this
copy.

-----


--=-=-=
Content-Type: text/x-patch
Content-Disposition: inline;
 filename=0001-Fix-off-by-one-error-when-going-forward-in-end-of-de.patch
Content-Description: Fix off-by-one error in end-of-defun

From bffa381cd9847b22b3589076b9dabeb572577580 Mon Sep 17 00:00:00 2001
From: Robert Cochran <robert-git@HIDDEN>
Date: Tue, 13 Sep 2016 13:17:32 -0700
Subject: [PATCH] Fix off-by-one error when going forward in end-of-defun

end-of-defun (C-M-e) goes forward one too many defuns when given a
prefix argument.  Fix this so that doing 'C-M-e' foo times and using
'C-u foo C-M-e' do the same thing.

* lisp/emacs-lisp/lisp.el (end-of-defun): Fix off-by-one error when
going forward.
---
 lisp/emacs-lisp/lisp.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/emacs-lisp/lisp.el b/lisp/emacs-lisp/lisp.el
index ea7cce6..bf03c44 100644
--- a/lisp/emacs-lisp/lisp.el
+++ b/lisp/emacs-lisp/lisp.el
@@ -452,7 +452,7 @@ end-of-defun
         ;; We started from after the end of the previous function.
         (goto-char pos))
       (unless (zerop arg)
-        (beginning-of-defun-raw (- arg))
+        (beginning-of-defun-raw (1+ (- arg)))
         (funcall end-of-defun-function)))
      ((< arg 0)
       ;; Moving backward.
-- 
2.7.4


--=-=-=
Content-Type: text/plain

-----

HTH,
-- 
~Robert Cochran

GPG Fingerprint - E778 2DD4 FEA6 6A68 6F26  AD2D E5C3 EB36 4886 8871

--=-=-=--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#24427; Package emacs. Full text available.

Message received at 24427 <at> debbugs.gnu.org:


Received: (at 24427) by debbugs.gnu.org; 13 Sep 2016 20:27:13 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Sep 13 16:27:13 2016
Received: from localhost ([127.0.0.1]:58937 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1bjuIT-0002hj-0x
	for submit <at> debbugs.gnu.org; Tue, 13 Sep 2016 16:27:13 -0400
Received: from mail.workgrouplinux.net ([207.195.177.82]:51415)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <robert-emacs@HIDDEN>) id 1bjuIR-0002hZ-PE
 for 24427 <at> debbugs.gnu.org; Tue, 13 Sep 2016 16:27:12 -0400
DKIM-Signature: v=1; a=rsa-sha1; c=simple; d=cochranmail.com; h=from:to
 :cc:subject:references:date:in-reply-to:message-id:mime-version
 :content-type; s=dkim1; bh=3PkzmrkbilRCeXx/RsauSAk1ees=; b=oVmCl
 9nFLndagoPtVqswSlltHUz7l4QKUX/HpIjd6JTlC5D5xus9wuGlArYSlwTqz30fU
 jdlhEjjxb5vjZmLIoD9tu1IDS0My45iU7uqklu8IRJAjF6arF14lP9UAj80xyPFJ
 KSkNsP8GzY/seUc8LbQfoJSl+TrmumpGILUdUTcwN7d14tHRtJ/dOUxHY6STit62
 aKa7YUAwDHQP2fpuazydB6AuxY8f9GVpaeGivo1TnzufD5AxVLMK7tESDf3U2MD3
 FzR+xAhUyeqbmbhQeXm3q/b35y10rOs58c0Od3lCRICkfgPuaMAj/kqKPXd7IxfU
 hCxg7MoqxhnpC+zgA==
Received: (qmail 24616 invoked by uid 0); 13 Sep 2016 20:27:08 -0000
Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys
DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=private; d=cochranmail.com;
 b=l5m+N9tssYGSmk/AnvQp7FWzSmmKZRZffBWVHzuykejzZpB490EY5ERCtuQYxTN1ClEbSOOaEgJU/gfGLRfGrA==;
Received: from 74-93-99-217-washington.hfc.comcastbusiness.net (HELO
 SoraLaptop) (robert@HIDDEN@74.93.99.217)
 by mail.cochrantribe.org with ESMTPA; 13 Sep 2016 20:27:08 -0000
From: Robert Cochran <robert-emacs@HIDDEN>
To: Marcin Borkowski <mbork@HIDDEN>
Subject: Re: bug#24427: 25.1.50; end-of-defun jumps too far
References: <87fup4q7ut.fsf@HIDDEN>
Date: Tue, 13 Sep 2016 13:26:59 -0700
In-Reply-To: <87fup4q7ut.fsf@HIDDEN> (Marcin Borkowski's message of "Tue, 13
 Sep 2016 14:53:14 +0200")
Message-ID: <87d1k7a6lo.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 24427
Cc: 24427 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 0.0 (/)

--=-=-=
Content-Type: text/plain

Appears to be an off-by-one error when calling `beginning-of-defun-raw`
during the second part of moving forward. This patch `1+`s the `(- arg)`
to make both methods equivalent.

Please do not hesitate to mention anything I may have missed.

-----


--=-=-=
Content-Type: text/x-patch
Content-Disposition: inline;
 filename=0001-Fix-off-by-one-error-when-going-forward-in-end-of-de.patch
Content-Description: Fix off-by-one error in end-of-defun

From 0f4facc6ea2bfe01ba3b8c7e3a0e99210d1bb1e1 Mon Sep 17 00:00:00 2001
From: Robert Cochran <robert-git@HIDDEN>
Date: Tue, 13 Sep 2016 13:17:32 -0700
Subject: [PATCH] Fix off-by-one error when going forward in end-of-defun

end-of-defun (C-M-e) goes forward one too many defuns when given a
prefix argument. Fix this so that doing 'C-M-e' foo times and using 'C-u
foo C-M-e' do the same thing.

* lisp/emacs-lisp/lisp.el (end-of-defun): Fix off-by-one error when
going forward.
---
 lisp/emacs-lisp/lisp.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/emacs-lisp/lisp.el b/lisp/emacs-lisp/lisp.el
index ea7cce6..bf03c44 100644
--- a/lisp/emacs-lisp/lisp.el
+++ b/lisp/emacs-lisp/lisp.el
@@ -452,7 +452,7 @@ end-of-defun
         ;; We started from after the end of the previous function.
         (goto-char pos))
       (unless (zerop arg)
-        (beginning-of-defun-raw (- arg))
+        (beginning-of-defun-raw (1+ (- arg)))
         (funcall end-of-defun-function)))
      ((< arg 0)
       ;; Moving backward.
-- 
2.7.4


--=-=-=
Content-Type: text/plain

-----

HTH,
-- 
~Robert Cochran

GPG Fingerprint - E778 2DD4 FEA6 6A68 6F26  AD2D E5C3 EB36 4886 8871

--=-=-=--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#24427; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 13 Sep 2016 12:53:36 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Sep 13 08:53:36 2016
Received: from localhost ([127.0.0.1]:58283 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1bjnDT-0007KG-SV
	for submit <at> debbugs.gnu.org; Tue, 13 Sep 2016 08:53:36 -0400
Received: from eggs.gnu.org ([208.118.235.92]:54414)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <mbork@HIDDEN>) id 1bjnDR-0007K2-Or
 for submit <at> debbugs.gnu.org; Tue, 13 Sep 2016 08:53:34 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <mbork@HIDDEN>) id 1bjnDL-0008HU-Ke
 for submit <at> debbugs.gnu.org; Tue, 13 Sep 2016 08:53:28 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: ****
X-Spam-Status: No, score=4.3 required=5.0 tests=BAYES_50,RCVD_IN_SORBS_WEB
 autolearn=disabled version=3.3.2
Received: from lists.gnu.org ([2001:4830:134:3::11]:40762)
 by eggs.gnu.org with esmtp (Exim 4.71)
 (envelope-from <mbork@HIDDEN>) id 1bjnDL-0008Gz-I4
 for submit <at> debbugs.gnu.org; Tue, 13 Sep 2016 08:53:27 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:45369)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <mbork@HIDDEN>) id 1bjnDJ-0006o7-5p
 for bug-gnu-emacs@HIDDEN; Tue, 13 Sep 2016 08:53:26 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <mbork@HIDDEN>) id 1bjnDE-0008EJ-Vn
 for bug-gnu-emacs@HIDDEN; Tue, 13 Sep 2016 08:53:24 -0400
Received: from mail.mojserwer.eu ([195.110.48.8]:42876)
 by eggs.gnu.org with esmtp (Exim 4.71)
 (envelope-from <mbork@HIDDEN>) id 1bjnDE-0008DQ-P6
 for bug-gnu-emacs@HIDDEN; Tue, 13 Sep 2016 08:53:20 -0400
Received: from localhost (localhost [127.0.0.1])
 by mail.mojserwer.eu (Postfix) with ESMTP id E8287E6586
 for <bug-gnu-emacs@HIDDEN>; Tue, 13 Sep 2016 14:53:12 +0200 (CEST)
X-Virus-Scanned: Debian amavisd-new at mail.mojserwer.eu
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 QSqRVaab-qrl for <bug-gnu-emacs@HIDDEN>;
 Tue, 13 Sep 2016 14:53:09 +0200 (CEST)
Received: from localhost (unknown [212.2.101.50])
 by mail.mojserwer.eu (Postfix) with ESMTPSA id CDED21D6004
 for <bug-gnu-emacs@HIDDEN>; Tue, 13 Sep 2016 14:53:08 +0200 (CEST)
User-agent: mu4e 0.9.17; emacs 25.1.50.6
From: Marcin Borkowski <mbork@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: 25.1.50; end-of-defun jumps too far
Date: Tue, 13 Sep 2016 14:53:14 +0200
Message-ID: <87fup4q7ut.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 2001:4830:134:3::11
X-Spam-Score: -1.5 (-)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.5 (-)

Hi Emacs bug team,

consider an Emacs Lisp buffer like this:

--8<---------------cut here---------------start------------->8---
(defun a ())

(defun b ())

(defun c ())
--8<---------------cut here---------------end--------------->8---

Place the point anywhere on the first line and press C-M-e
(`end-of-defun') twice.  Now place the point back on the first line and
press C-u 2 C-M-e.  The result is (and should be) the same as before.

Now consider this buffer:

--8<---------------cut here---------------start------------->8---
(defun a ())
(defun b ())
(defun c ())
--8<---------------cut here---------------end--------------->8---

Repeat the same steps as above.  After pressing C-M-e twice (starting on
the first line), the point lands right before "(defun c ())".  After
pressing C-u 2 C-M-e, it lands _after_ that defun.  I am quite sure it
should be in the same place as after C-M-e C-M-e.

I use GNU Emacs 25.1.50.6 (commit b12fac8).  I tested this on emacs -Q.

Best,
Marcin Borkowski




In GNU Emacs 25.1.50.6 (x86_64-unknown-linux-gnu, GTK+ Version 3.20.6)
 of 2016-08-03 built on jane
Repository revision: 0f690c4a0e4e98a929b5439f6076539bbea59242
Windowing system distributor 'The X.Org Foundation', version 11.0.11804000

Configured features:
XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GCONF GSETTINGS
NOTIFY ACL GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB
TOOLKIT_SCROLL_BARS GTK3 X11 LIBSYSTEMD

Important settings:
  value of $LC_COLLATE: pl_PL.UTF-8
  value of $LC_CTYPE: pl_PL.UTF-8
  value of $LC_MESSAGES: pl_PL.UTF-8
  value of $LANG: pl_PL.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Emacs-Lisp

Minor modes in effect:
  diff-auto-refine-mode: t
  global-git-commit-mode: t
  async-bytecomp-package-mode: t
  beeminder-org-integration-mode: t
  TeX-PDF-mode: t
  pdf-occur-global-minor-mode: t
  yas-global-mode: t
  yas-minor-mode: t
  savehist-mode: t
  global-flycheck-mode: t
  projectile-global-mode: t
  projectile-mode: t
  ivy-mode: t
  show-paren-mode: t
  shell-dirtrack-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Memory information:
((conses 16 1884431 142870)
 (symbols 48 85829 0)
 (miscs 40 9808 8727)
 (strings 32 324415 120559)
 (string-bytes 1 12120978)
 (vectors 16 127614)
 (vector-slots 8 2717980 77714)
 (floats 8 31935 16669)
 (intervals 56 171322 1289)
 (buffers 976 132)
 (heap 1024 236107 10150))

-- 
Marcin Borkowski




Acknowledgement sent to Marcin Borkowski <mbork@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#24427; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Mon, 25 Nov 2019 12:00:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.