– The Dow was held back by a slump in McDonald’s stock Wednesday, leaving it short of a record.

The Dow Jones industrial average shed 35.79 points to close at 13,982.91. The Dow has gained 6.7 percent this year and is 182 points below the record close of 14,164 it set in October 2007.

McDonald’s was a big decliner, losing $1.10 to $94, as investors worried that Americans will spend less on eating out after a rise in Social Security taxes at the start of the year. The government reported Wednesday that spending by Americans barely grew last month.

Other fast-food companies also fell. Buffalo Wild Wings stock plunged $4.52 to $76.55 after its earnings fell short of analysts’ expectations. Burger King and Wendy’s also fell.

‘’Consumer spending is coming under pressure,’’ said Bryan Elliott, an analyst at Raymond James. ‘’It’s the easiest way to save money, stay at home and cook.’’

The Standard & Poor’s 500 index edged up 0.90 point to 1,520.33. The index climbed as high as 1,524 during the day, the highest since November 2007. It is up 6.6 percent so far this year. The Nasdaq composite rose 10.38 points to 3,196.88.

Investors sent General Electric and Comcast higher after GE agreed Tuesday to sell its stake in NBC Universal to Comcast for $16.7 billion. GE said it would use up to $10 billion of the money to buy back its own stock. GE rose 81 cents to $23.39. Comcast advanced $1.16 to $40.13.

Trading has been relatively quiet in recent days following a strong opening to the year. The Dow logged its best January in almost two decades after lawmakers reached a last-minute deal to avoid the “fiscal cliff’’ of sweeping tax increases and spending cuts. Investors are also more optimistic that the housing market is recovering and that hiring is picking up.

“We’re cautiously optimistic on stocks,’’ said Colleen Supran, principal at Bingham, Osborn & Scarborough. ‘’There is some indication that we could be continuing on this slow growth trajectory.’’

Supran said investors should still be prepared for volatility and not assume that the gains from January and so far in February will set the pattern for the rest of the year.