From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Robert Cochran Newsgroups: gmane.emacs.bugs Subject: bug#24427: 25.1.50; end-of-defun jumps too far Date: Tue, 13 Sep 2016 13:30:21 -0700 Message-ID: <8760pza6g2.fsf@cochranmail.com> References: <87fup4q7ut.fsf@mbork.pl> <87d1k7a6lo.fsf@cochranmail.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: blaine.gmane.org 1473798696 9761 195.159.176.226 (13 Sep 2016 20:31:36 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 13 Sep 2016 20:31:36 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) Cc: Marcin Borkowski , 24427@debbugs.gnu.org To: Robert Cochran Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Sep 13 22:31:32 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1bjuMO-0000QT-Bm for geb-bug-gnu-emacs@m.gmane.org; Tue, 13 Sep 2016 22:31:21 +0200 Original-Received: from localhost ([::1]:51473 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bjuMM-0001to-Ha for geb-bug-gnu-emacs@m.gmane.org; Tue, 13 Sep 2016 16:31:14 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:59914) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bjuMF-0001sg-PN for bug-gnu-emacs@gnu.org; Tue, 13 Sep 2016 16:31:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bjuMA-0006J3-PV for bug-gnu-emacs@gnu.org; Tue, 13 Sep 2016 16:31:07 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:32997) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bjuMA-0006Ir-M2 for bug-gnu-emacs@gnu.org; Tue, 13 Sep 2016 16:31:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1bjuMA-0002oY-G9 for bug-gnu-emacs@gnu.org; Tue, 13 Sep 2016 16:31:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Robert Cochran Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 13 Sep 2016 20:31:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 24427 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 24427-submit@debbugs.gnu.org id=B24427.147379862510769 (code B ref 24427); Tue, 13 Sep 2016 20:31:02 +0000 Original-Received: (at 24427) by debbugs.gnu.org; 13 Sep 2016 20:30:25 +0000 Original-Received: from localhost ([127.0.0.1]:58942 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bjuLZ-0002nd-Fq for submit@debbugs.gnu.org; Tue, 13 Sep 2016 16:30:25 -0400 Original-Received: from mail.workgrouplinux.net ([207.195.177.82]:51426) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bjuLX-0002nT-NS for 24427@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== Original-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==; Original-Received: from 74-93-99-217-washington.hfc.comcastbusiness.net (HELO SoraLaptop) (robert@cochranmail.com@74.93.99.217) by mail.cochrantribe.org with ESMTPA; 13 Sep 2016 20:30:22 -0000 In-Reply-To: <87d1k7a6lo.fsf@cochranmail.com> (Robert Cochran's message of "Tue, 13 Sep 2016 13:26:59 -0700") 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:123273 Archived-At: --=-=-= 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 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 --=-=-=--