M&S have rightly (if somewhat belatedly) recognised that they can't really compete on many clothing lines. (M&S in Ipswich is directly opposite Primark. I'm sure that you can guess which store gets the most customers for clothing!).
However their food lines continue to do well, which is why they're
(a) greatly increasing the number of items within their ranges ;
(b) enlarging the food sections of existing stores to accommodate those ranges ;
(c) opening new stores, selling solely foods, which are larger than their existing 'Simply Food' stores (in order to accommodate the larger ranges) ; and
(d) working with Ocado to start a home delivery service from September next year, with M&S products replacing those from Waitrose (whose contract with Ocado expires at that time).
M&S products are (when compared with those from Asda, Tesco, Morrisons or Sainsbury's) often quite expensive but they'll be targetting customers who use Waitrose or Ocado for their foods. That's a significant sector of the market, so (unlike many other names on the High Street) M&S might still be around for many years to come.