From: Piotr Sipika <piotr.sipika@gmail.com>
To: Alan Mackenzie <acm@muc.de>
Cc: 18970@debbugs.gnu.org
Subject: bug#18970: 24.3; indent region fails in C++ mode after adding a #include
Date: Fri, 07 Nov 2014 11:14:21 -0500 [thread overview]
Message-ID: <545CEFDD.1080404@gmail.com> (raw)
In-Reply-To: <545B7D65.8080505@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 901 bytes --]
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
<libxml/xpath.h>
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
[-- Attachment #2: libxmlparser.h --]
[-- Type: text/plain, Size: 942 bytes --]
#ifndef LXWEATHER_LIBXMLPARSER_H_
#define LXWEATHER_LIBXMLPARSER_H_
#include "parser.h"
#include <pthread.h>
namespace LXWeather
{
/* forward declarations */
class Location;
class Forecast;
class LibXMLParser : public Parser
{
public:
LibXMLParser(pthread_mutex_t *mutex);
virtual ~LibXMLParser();
virtual std::vector<Location *> parseLocationList(const std::string &data);
virtual void parseForecast(const std::string &data, Forecast *forecast);
protected:
class XPATHWrapper
{
public:
XPATHWrapper() : pContext_(NULL)
{
xmlXPathInit();
}
~NanoHTTPWrapper()
{
xmlNanoHTTPClose(pContext_);
}
std::string get(const std::string &URI, int *retcode);
private:
void *pContext_;
};
private:
pthread_mutex_t *mutex_;
};
} /* end namespace LXWeather */
#endif /* LXWEATHER_LIBXMLPARSER_H_ */
next prev parent reply other threads:[~2014-11-07 16:14 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-06 3:44 bug#18970: 24.3; indent region fails in C++ mode after adding a #include Piotr Sipika
[not found] ` <mailman.12996.1415245577.1147.bug-gnu-emacs@gnu.org>
2014-11-06 11:54 ` Alan Mackenzie
2014-11-06 13:53 ` Piotr Sipika
2014-11-07 16:14 ` Piotr Sipika [this message]
[not found] ` <545D3F5E.8030801@gmail.com>
2014-11-07 23:24 ` Alan Mackenzie
2014-11-08 2:27 ` Piotr Sipika
2014-11-08 3:08 ` Piotr Sipika
2014-11-08 8:29 ` Alan Mackenzie
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=545CEFDD.1080404@gmail.com \
--to=piotr.sipika@gmail.com \
--cc=18970@debbugs.gnu.org \
--cc=acm@muc.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.