Translation:Shulchan Aruch/Orach Chaim/288
288: Ruling of a fast and ruling of a fast for a dream on Shabbat. Contains 10 subsections.
1 It is forbidden to fast until six hours on Shabbat.
[Gloss: and even for the purpose of learning and praying, it is forbidden] [Mordechai, first chapter of Shabbat].
2 Some say that a person who is harmed by eating, such that it is their delight not to eat, should not eat. Gloss: And so, one who has delight if he will weep, in order that the pain will leave their heart: it is permitted to weep on Shabbat. (Igur in the name of Shibolei haLeket).
3 A person who fasts every day, and eating on Shabbat is painful for him because of the change in routine (explanation: a fixed thing), some say they have seen several pious and noble people who have fasted on Shabbat because of this reasoning, and likewise they said that so acted Rabbi Yehuda heChasid.
4 It is permitted to fast on it a fast for a dream, in order that the decree of judgement should be torn up – and one needs to fast on Sunday, in order to atone for him that he nullified the delight of Shabbat. And if his strength was weakened and he can't fast two consecutive days, he shouldn't fast on Sunday and should fast after that. Gloss: And so much the more, if on Sunday was Chanukah or Purim or a festival, even the second day of a festival in the Diaspora, that one shouldn't fast until after then. Some say, one who napped in the middle of the day and dreamt a bad dream should fast from noon to midnight and then make havdalah, and on Sunday he should fast as though he fasted the whole day of Shabbat. (I found written).
5 Some say that there's no justification to fast a dream-fast on Shabbat unless for a dream that one saw it three times. And some say that at this time one shouldn't fast a dream-fast on Shabbat for we aren't experts in dream interpretation to know which is good and which is bad. And people say that it's found in ancient books that on three dreams we fast on Shabbat; and they are these: one who sees a Sefer Torah that is burnt, or Yom Kippur at the time of neilah, or the beams of one's house or his teeth that fell out. And some say: one who sees Yom Kippur, even not at the time of neilah. And some say: one who sees that he is reading in the Torah. And some say: one who sees that he is marrying a woman. And regarding one who sees his teeth that fell out: specifically his teeth. But one who sees his jaws that fell out: it is a good dream; that those who offer bad counsel against him have died. And it seems to me that the dreams that they said in Chapter "One who Sees" that they are bad, also over them one fasts on Shabbat.
6 One who fasts on Shabbos recites "Aneinu…" after the conclusion of his prayer, without a conclusion, and includes it in "My God, Keep…". Gloss: And one should say after his prayer "Master of the worlds, it is revealed etc." like during the week (Or Zarua, Laws of a Fast).
7 If eating earlier is a pleasure for him, e.g., the evening meal has already been digested, he should eat earlier. And if delaying is a pleasure for him, e.g., it has not yet been digested, he should delay. Gloss: And likewise, he who has meals every day like during Shabbat should make a change on Shabbat to eat earlier or later. (Gemara, Chapter 22; and Tur).
8 We do not fast for any trouble of the troubles at all.
9 We do not yell out and we do not afflict ourselves on it over any trouble, except for the trouble of the nourishments; that we yell out for it by mouth on Shabbat and not with a shofar. And likewise, a city that heathens surrounded it, or a river and a boat which is torn apart at sea; and even over an individual who is persecuted by a heathen or thieves or a bad spirit; we yell out and say supplications with prayers on Shabbat, but we do not blow a shofar, unless we blow to gather the nation to help their brethren and to save them (and see below, Siman 576, Seif 13).
10 "One who is persecuted by a bad spirit" that they said – is not specific; for this is the law for any illness that contains a danger of the day. We yell out and say supplications. And such is the custom to say "We pray…" on Shabbat over the sick who are in danger with the dangers of the day. Gloss: And likewise, it is permitted to bless the ill person who is in danger during that day. (Likutei Mahar"i Brin; and Beis Yosef in the name of the Ra"n, Perek 3 of Fast).