I created a command that prints material in an aux file and that's all. I can reasonably expect it to (also) be used in the following ways:
\precis{Some text}
The section goes on.
\precis{Some text}
The section goes on.
That is, with or without the % signs at the end of lines that would automatically take care of any spurious spaces.
In order to remove the trailing spaces the command is defined as:
\newcommand{\precis}[1]{%
% Whatever the command does
\ignorespaces%
}
However, as shown in my second example, there is still the case of a "spurious \par" which I don't know how to deal with.
I have tried using \@gobble instead, but indeed this only works if the next character is a space or blank line, and it breaks if %-signs were used (i.e. it swallows the first letter of the sentence).
So, I would like to be able to gobble only whitespace and the implicit par. Is that possible?
(I am working on a package, hence the attempt to be foolproof… I can go with the % signs for myself.)

\precisto be an inline heading using\@startsectionor a list\itemboth of which have built in code to do exactly this. – David Carlisle Jul 15 '15 at 08:41\@startsectiona try whenever I have time. – ienissei Jul 15 '15 at 08:45\@startsectionor\itemwork, an explanation would be welcome. – Manuel Jul 15 '15 at 08:52