From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Piotr Sipika Newsgroups: gmane.emacs.bugs Subject: bug#18970: 24.3; indent region fails in C++ mode after adding a #include Date: Fri, 07 Nov 2014 11:14:21 -0500 Message-ID: <545CEFDD.1080404@gmail.com> References: <20141106115429.80515.qmail@mail.muc.de> <545B7D65.8080505@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------000604040606060500090102" X-Trace: ger.gmane.org 1415376938 15973 80.91.229.3 (7 Nov 2014 16:15:38 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 7 Nov 2014 16:15:38 +0000 (UTC) Cc: 18970@debbugs.gnu.org To: Alan Mackenzie Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Nov 07 17:15:30 2014 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 1XmmC9-0002fE-O2 for geb-bug-gnu-emacs@m.gmane.org; Fri, 07 Nov 2014 17:15:29 +0100 Original-Received: from localhost ([::1]:60899 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XmmC9-00055U-9a for geb-bug-gnu-emacs@m.gmane.org; Fri, 07 Nov 2014 11:15:29 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47389) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XmmBy-00054H-Ai for bug-gnu-emacs@gnu.org; Fri, 07 Nov 2014 11:15:25 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XmmBq-00083Z-MW for bug-gnu-emacs@gnu.org; Fri, 07 Nov 2014 11:15:18 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:55851) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XmmBi-0007nl-O5; Fri, 07 Nov 2014 11:15:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1XmmBi-0000bh-3m; Fri, 07 Nov 2014 11:15:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Piotr Sipika Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org, bug-cc-mode@gnu.org Resent-Date: Fri, 07 Nov 2014 16:15:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 18970 X-GNU-PR-Package: emacs,cc-mode X-GNU-PR-Keywords: Original-Received: via spool by 18970-submit@debbugs.gnu.org id=B18970.14153768672278 (code B ref 18970); Fri, 07 Nov 2014 16:15:01 +0000 Original-Received: (at 18970) by debbugs.gnu.org; 7 Nov 2014 16:14:27 +0000 Original-Received: from localhost ([127.0.0.1]:53064 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XmmB8-0000af-R1 for submit@debbugs.gnu.org; Fri, 07 Nov 2014 11:14:27 -0500 Original-Received: from mail-qa0-f53.google.com ([209.85.216.53]:57356) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XmmB6-0000aX-KM for 18970@debbugs.gnu.org; Fri, 07 Nov 2014 11:14:24 -0500 Original-Received: by mail-qa0-f53.google.com with SMTP id n8so2536659qaq.12 for <18970@debbugs.gnu.org>; Fri, 07 Nov 2014 08:14:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:message-id:date:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type; bh=cV6OF/i+aCO+LT13AMPDrFxE8q2sEkse8pav1Og8CgI=; b=nUi8NnyLwuMMmA0/qYh7wW+H9YAGoQplc/GyHJnUgNlYMwmFfMiJu6i0EvG3FvL8JN WRncsBgRhonYq37JYkygq/o28xb46mti5fEyDkashCnp+EMjbAkq7wgDItOK4Gr8UphU Hhb1Y19F771ts/9vGMshl6AFqJgL5bvLSdolWJEXw7Mec1R9gJNbIrStTuAPZ5B8Y0Uu fDZI73Y/Nt6V4v4MyVWhtGe3Fz1seZLUIjKY+gFxPmzqOrKl1PZu5IvbgXQ6QffJqgPl VKFxkJWw2X0RxPY2Yrgqjtu5LJslerl1SO9Siz+tXKuYobMnNE39Jj0LyAL0tAINBa4d VjfA== X-Received: by 10.140.49.107 with SMTP id p98mr17793209qga.20.1415376864264; Fri, 07 Nov 2014 08:14:24 -0800 (PST) Original-Received: from [192.168.1.5] (pool-108-5-32-69.nwrknj.east.verizon.net. [108.5.32.69]) by mx.google.com with ESMTPSA id e2sm5038651qaw.10.2014.11.07.08.14.22 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 07 Nov 2014 08:14:22 -0800 (PST) X-Google-Original-From: Piotr Sipika User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 In-Reply-To: <545B7D65.8080505@gmail.com> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.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-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:95674 This is a multi-part message in MIME format. --------------000604040606060500090102 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Alan, here's another instance of the problem: > The steps were: > 1. Edited a C++ header file in a buffer. The file is attached (libxmlparser.h). I've had it open in a buffer for a while and have edited it successfully (without the indentation problem) within the current emacs session. I just switched to it from another buffer. > 4. Added a #include to the top of the buffer. 4.1 I added a newline on line 8. 4.2 I then added another #include (pasted using C-y): #include 4.3 I then added another newline under the new #include. > 5. Indentation for all code blocks following the include, when using Tested line 14 (of the updated file) with a [TAB] and noticed the forward declaration got moved to column 0. When I undo all changes (steps 4.3 to 4.1), indentation is OK (remains at respective column). When I repeat the steps, indentation gets moved to column 0. Best! Piotr --------------000604040606060500090102 Content-Type: text/plain; charset=UTF-8; name="libxmlparser.h" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="libxmlparser.h" CiNpZm5kZWYgTFhXRUFUSEVSX0xJQlhNTFBBUlNFUl9IXwojZGVmaW5lIExYV0VBVEhFUl9M SUJYTUxQQVJTRVJfSF8KCiNpbmNsdWRlICJwYXJzZXIuaCIKCiNpbmNsdWRlIDxwdGhyZWFk Lmg+CgpuYW1lc3BhY2UgTFhXZWF0aGVyCnsKICAvKiBmb3J3YXJkIGRlY2xhcmF0aW9ucyAq LwogIGNsYXNzIExvY2F0aW9uOwogIGNsYXNzIEZvcmVjYXN0OwoKICBjbGFzcyBMaWJYTUxQ YXJzZXIgOiBwdWJsaWMgUGFyc2VyCiAgewogIHB1YmxpYzoKICAgIExpYlhNTFBhcnNlcihw dGhyZWFkX211dGV4X3QgKm11dGV4KTsKCiAgICB2aXJ0dWFsIH5MaWJYTUxQYXJzZXIoKTsK CiAgICB2aXJ0dWFsIHN0ZDo6dmVjdG9yPExvY2F0aW9uICo+IHBhcnNlTG9jYXRpb25MaXN0 KGNvbnN0IHN0ZDo6c3RyaW5nICZkYXRhKTsKICAgIHZpcnR1YWwgdm9pZCBwYXJzZUZvcmVj YXN0KGNvbnN0IHN0ZDo6c3RyaW5nICZkYXRhLCBGb3JlY2FzdCAqZm9yZWNhc3QpOwogICAg CiAgcHJvdGVjdGVkOgogICAgY2xhc3MgWFBBVEhXcmFwcGVyCiAgICB7CiAgICBwdWJsaWM6 CiAgICAgIFhQQVRIV3JhcHBlcigpIDogcENvbnRleHRfKE5VTEwpCiAgICAgICAgewogICAg ICAgICAgeG1sWFBhdGhJbml0KCk7CiAgICAgICAgfQoKICAgICAgfk5hbm9IVFRQV3JhcHBl cigpCiAgICAgICAgewogICAgICAgICAgeG1sTmFub0hUVFBDbG9zZShwQ29udGV4dF8pOwog ICAgICAgIH0KCiAgICAgIHN0ZDo6c3RyaW5nIGdldChjb25zdCBzdGQ6OnN0cmluZyAmVVJJ LCBpbnQgKnJldGNvZGUpOwogICAgICAKICAgIHByaXZhdGU6CiAgICAgIHZvaWQgKnBDb250 ZXh0XzsKICAgIH07CgogIHByaXZhdGU6CiAgICBwdGhyZWFkX211dGV4X3QgKm11dGV4XzsK ICB9OwoKfSAvKiBlbmQgbmFtZXNwYWNlIExYV2VhdGhlciAqLwoKI2VuZGlmIC8qIExYV0VB VEhFUl9MSUJYTUxQQVJTRVJfSF8gKi8K --------------000604040606060500090102--