From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.bugs Subject: bug#24148: 25.1.50; M-x c-end-of-statement does not work on narrowed buffer Date: Thu, 4 Aug 2016 21:20:49 +0000 Message-ID: <20160804212049.GA4021@acm.fritz.box> References: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: blaine.gmane.org 1470345743 3071 195.159.176.226 (4 Aug 2016 21:22:23 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 4 Aug 2016 21:22:23 +0000 (UTC) User-Agent: Mutt/1.5.24 (2015-08-30) Cc: 24148@debbugs.gnu.org To: Daiki Ueno Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Aug 04 23:22:20 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 1bVQ5r-00006S-Hv for geb-bug-gnu-emacs@m.gmane.org; Thu, 04 Aug 2016 23:22:19 +0200 Original-Received: from localhost ([::1]:41812 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bVQ5n-0008Ba-W7 for geb-bug-gnu-emacs@m.gmane.org; Thu, 04 Aug 2016 17:22:16 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:59379) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bVQ5e-00089Q-3G for bug-gnu-emacs@gnu.org; Thu, 04 Aug 2016 17:22:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bVQ5a-0006SR-0V for bug-gnu-emacs@gnu.org; Thu, 04 Aug 2016 17:22:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:58620) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bVQ5Z-0006SH-TL; Thu, 04 Aug 2016 17:22:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1bVQ5Z-0003p0-MP; Thu, 04 Aug 2016 17:22:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Alan Mackenzie Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org, bug-cc-mode@gnu.org Resent-Date: Thu, 04 Aug 2016 21:22:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 24148 X-GNU-PR-Package: emacs,cc-mode X-GNU-PR-Keywords: Original-Received: via spool by 24148-submit@debbugs.gnu.org id=B24148.147034568914650 (code B ref 24148); Thu, 04 Aug 2016 21:22:01 +0000 Original-Received: (at 24148) by debbugs.gnu.org; 4 Aug 2016 21:21:29 +0000 Original-Received: from localhost ([127.0.0.1]:55917 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bVQ53-0003oE-IM for submit@debbugs.gnu.org; Thu, 04 Aug 2016 17:21:29 -0400 Original-Received: from mail.muc.de ([193.149.48.3]:35576) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bVQ51-0003o5-C0 for 24148@debbugs.gnu.org; Thu, 04 Aug 2016 17:21:27 -0400 Original-Received: (qmail 42107 invoked by uid 3782); 4 Aug 2016 21:21:26 -0000 Original-Received: from acm.muc.de (p548C79BE.dip0.t-ipconnect.de [84.140.121.190]) by colin.muc.de (tmda-ofmipd) with ESMTP; Thu, 04 Aug 2016 23:21:24 +0200 Original-Received: (qmail 13172 invoked by uid 1000); 4 Aug 2016 21:20:49 -0000 Content-Disposition: inline In-Reply-To: X-Delivery-Agent: TMDA/1.1.12 (Macallan) X-Primary-Address: acm@muc.de 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:121837 Archived-At: Hello, Daiki On Thu, Aug 04, 2016 at 10:05:00AM +0200, Daiki Ueno wrote: > Steps to reproduce: > - C-x C-f /usr/include/stdio.h > - mark region around a function declaration, e.g., > extern FILE *fopen (const char *__restrict __filename, > const char *__restrict __modes) __wur; > - M-x narrow-to-region > - put cursor on the beginning of the function declaration > - M-x c-end-of-statement > Then I get: > c-state-full-pp-to-literal: Args out of range: #, 6001, 7659 > The command moves the cursor to the ';' without error if the buffer is > not narrowed. Thanks for taking the trouble to report this bug. You didn't say what version of Emacs you're using, but I think it was from the savannah master branch. I've committed a fix to this branch. If you're indeed using it, would you please update and rebuild, then check that the bug really is fixed. Otherwise, please tell me the version of Emacs you're using, then I can create a patch for that. > Regards, > -- > Daiki Ueno -- Alan Mackenzie (Nuremberg, Germany).