Shabbos, Chapter 2, Mishnah 5. This mishnah deals with the melachah of extinguishing: the prohibition of putting out a fire on Shabbos, and the question of when a person is exempt, when he is permitted to extinguish, and when he is liable.
Extinguishing Because of Danger:
The mishnah opens: "HaMechabeh es haner mipnei shehu misyarei mipnei goyim, mipnei listim, mipnei ruach ra'ah, v'im bishvil hacholeh sheyishan - patur" - one who extinguishes a lamp because he is afraid of gentiles, of robbers, of a bad spirit, or in order that a sick person be able to sleep, is exempt. These are the cases:
"Mipnei goyim" - this refers to the Persians of those days, who on the day of their idolatrous festival did not permit a lamp to burn anywhere except in their house of idol worship. It was therefore dangerous for a Jew to leave a light burning in his home, and for that reason he was permitted to extinguish it on Shabbos.
"Mipnei listim" - because of robbers, so that they not see him by the light of the lamp.
"Mipnei ruach ra'ah" - a person who has been overcome by a bad spirit, melancholy and depression, and who cannot survive and function except in darkness. The extinguishing is done for the sake of his physical and mental health.
"Bishvil hacholeh sheyishan" - a sick person whose life is in danger, who needs to sleep and cannot sleep with the lamp burning.
In all of these cases the mishnah says that he is exempt. Now, the term 'exempt' generally means that a person does not incur a punishment, but in this case the act is permitted from the outset, since all of these cases involve danger to life, and wherever there is danger to life it is permitted to desecrate Shabbos. The term 'exempt' is not precise here, and the mishnah did not use it in its exact sense; rather, it serves as a contrast to the cases that follow, in which a person is liable to punishment or to bring a sacrifice.
One Who Extinguishes to Spare the Lamp, the Oil or the Wick:
The mishnah continues: "K'chas al haner, k'chas al hashemen, k'chas al hapetilah - chayav" - if he acted to spare the lamp, to spare the oil, or to spare the wick, he is liable:
"K'chas al haner" - he is concerned for the lamp itself, that it may crack because of the position of the flame.
"K'chas al hashemen" - he is concerned about the needless waste of fuel, and does not want the oil to burn up.
"K'chas al hapetilah" - he wants to preserve the wick, so that it not be consumed.
This is the view of the first Tanna, who follows the approach of Rabbi Yehudah: a melachah performed not for the purpose for which it was performed in the Mishkan still carries liability, even though it is not being done for that same reason. In our case the person has no interest in the extinguishing for its own sake, but only in preventing the waste of the oil, the wick or the lamp; and if there were another way to achieve this without extinguishing, he would have been satisfied with that. Even so, according to Rabbi Yehudah he is liable.
The View of Rabbi Yosi:
Rabbi Yosi exempts in all of these cases, because he holds like Rabbi Shimon, that the extinguishing here is not being done for the sake of extinguishing as it was in the Mishkan. He does, however, make an exception in the case of the wick, where the person's intent is directed at the wick itself: not merely to save it from burning up, but to char it. When he extinguishes it, a sort of charcoal forms at the tip of the wick, and that charcoal makes it easier to light the next time. Here the extinguishing is done for the sake of extinguishing and produces a positive result, just as was the case with extinguishing in the Mishkan, and therefore Rabbi Yosi says that in this case he is liable.