Daniel S. Loeb is getting some of what he asked for from Nestlé.

The Swiss food company said on Tuesday that it would buy back almost $21 billion of its shares over the next three years, a move that Mr. Loeb had urged the company to consider.

Nestlé said the plans were not a response to Mr. Loeb’s campaign, but were the result of a regular review. (That said, such reviews usually come in September.)

Mr. Loeb may also get some things he hadn’t asked for. He wanted Nestlé to slim down, but the food giant indicated that it might pursue acquisitions as well as shedding businesses. And the company said that those deals would be a higher priority than the stock buybacks. Nestlé said the bulk of repurchases would take place in 2019 and 2020 to let it make takeovers first.

For deal makers readying their pitch books, here are some of the areas that Nestlé may go shopping in:

• Coffee

• Pet care

• Consumer health care

One specific request of Mr. Loeb’s may not get much support from Nestlé’s top managers. He wanted the company to sell off its 23 percent stake in L’Oréal, but Ulf Mark Schneider, Nestlé’s chief executive, has described the cosmetics company as a “strategic asset,” suggesting that any change would need careful consideration.