I am getting confused between the type of mesomeric effect (+M or -M) shown by compounds containing $\ce-COX$$\ce{-COX}$ where $\ce X$$\ce{X}$ is an electronegative element.
Examples: $\ce -CONHCH_3$$\ce{-CONHCH3}$, $\ce -COOCH_3$$\ce{-COOCH3}$, $\ce -COOH$$\ce{-COOH}$.
According to me, all these compounds must show both a +M as well as a -M effect. Since the group (e.g. $\ce -COX$$\ce{-COX}$) can accept as well as donate $\pi$ electrons (as in $\ce CH_2=CH-COOH$$\ce{CH_2=CH-COOH}$).
However, the book says these compounds show only -M effect. Please explain me the reason behind it.
In the above example, isn't the group showing +M effect, since it's donating the electrons?