Negative-muon capture in ionic compounds and some related elements