Halachah · Shulchan Aruch

Shulchan Arukh, Orach Chayim 151/שולחן ערוך·אורח חיים קנ״א

אדיני קדושת ב"ה. ובו יב סעיפים:
בתי כנסיות ובתי מדרשות אין נוהגין בהם קלות ראש כגון שחוק והתול ושיחה בטילה ואין אוכלין ושותים בהם ולא מתקשטין בהם ולא מטיילין בהם ולא נכנסים בהם בחמה מפני החמה ובגשמים מפני הגשמים ות"ח ותלמידיהם מותרים לאכול ולשתות בהם מדוחק: (וי"א דבבית המדרש אפי' שלא מדוחק שרי): (ר"ן פרק בני העיר) ואין מחשבין בהם חשבונות אלא אם כן הם של מצוה כגון קופה של צדקה ופדיון שבויים ואין מספידין בהם אלא אם כן יהיה ההספד לאחד מגדולי העיר שכל בני העיר מתקבצים ובאים להספידו ואם צריך ליכנס בהם לצרכו כגון לקרא לאדם יכנס ויקרא מעט או יאמר דבר שמועה ואח"כ יקראנו כדי שלא יהא נראה כאלו נכנס לצרכו ואם אינו יודע לא לקרות ולא לשנות יאמר לא' מהתינוקות קרא לי פסוק שאתה קורא בו או ישהה מעט ואח"כ יצא שהישיבה בהם מצוה שנאמר אשרי יושבי ביתך (ושיעור הישיבה כדי הלוך שני פתחים) (לדעת הי"מ בסי' צ' ס"ס כ') (מרדכי ר"פ השותפין):
1The Laws of the Holiness of a Synagogue (containing 12 S'ifim): In a synagogue or house of study, one may not behave frivolously; for example: laughter, sarcasm, or idle conversation. One should not eat or drink in them, nor should one groom oneself in them or strolling around in them. One should not enter them in summer due to [seeking shelter from] the sun, nor in the rainy season due to [seeking shelter from] the rain. Torah scholars and their students are permitted to eat and drink in them out of necessity. (And there are those who say that in a house of study, it is permissible even when it is not out of necessity) (Ran, [on] chapter "B'nai Ha-ir" [i.e. Talmud Megillah, Chapter 4]). No monetary calculations should be made there unless they are for the purpose of a mitzvah; for example, collecting money for tz'dakah, or for the redemption of captives. And we do not deliver eulogies in them unless would be for a eulogy for one of the prominent members of the city, for all the people assemble and come to eulogize [such a person]. If one must enter there for one's own needs; for example, to call someone - one should enter and read a little or say a word of [Torah], and after that, call [the person] so that it should not appear as if one has entered for one's own needs. And if one doesn't know how to read or repeat [e.g., a mishnah], one should say to one of the children: "recite a verse that you are learning for me", or one should delay there for a bit, and [only] after that, leave, because sitting among them is a mitzvah, as it says "praiseworthy are those who dwell in Your house". (And the amount of sitting time corresponds to [the time is takes for] walking [the width of] two doorways.) (According to the opinion of "those that explain" in siman 90 at the end of s'if 20) (Mordechai at the beginning of chapter "HaShut'fin" [Bava Batra, Chapter 1]).
בי"א שמה ששנינו בקדושת בתי מדרשות ר"ל של רבים דומיא דב"ה אבל יחיד הקובע מדרש בביתו לצרכו אין לו קדושה כ"כ:
2There are some who say that what we taught about the sanctity of houses of study is intended to speak about public ones which are similar to a synagogue, but an individual who establishes [a room for] Torah study in one's home for one's [own] needs, it doesn't have so much sanctity.
גאין ישנים בב"ה אפילו שינת עראי אבל בבית המדרש מותר:
3We don't sleep in a synagogue, even for impromptu sleep, but in a house of study, it is permitted.
דלצורך ב"ה מותר לאכול ולישן בתוכו ומטעם זה ישנים בליל יום הכפורים בב"ה ואפילו לצורך מצוה אחרת כגון כשנקבצים לעבר השנה בב"ה מותר לאכול שם:
4For the needs of the synagogue, it is permitted to eat and sleep inside it. For this reason, they sleep in a synagogue the night of Yom Kippur. And even for the needs of another mitzvah; for example, when they gather to intercalate the year in the synagogue, it is permitted to eat there.
ההיו לב"ה שני פתחים לא יכנס בפתח זה לעשותו דרך לצאת בפתח השני לקצר דרכו ואם היה הדרך עובר קודם שנבנה ב"ה מותר וכן אם לא נכנס בו תחלה כדי לקצר דרכו מותר לעשותו דרך וכשנכנס בו להתפלל מותר למי שנכנס בפתח זה לצאת בפתח אחר:
5If the synagogue has two entrances, one should not enter through this [i.e., the first] entrance to make a path to leave via the second entrance to shorten one's route. If there was a path passing there before they built the synagogue, it is permitted. Similarly, if one didn't enter it initially in order to shorten one's route, it is permitted to make it a path. And when one enters it to pray, it is permitted for the one who entered by this [i.e., the first] entrance to leave via another entrance.
ומותר ליכנס בב"ה במקלו ובתרמילו ובאפונדתו (פי' מיני כיסים תרגום ובילקוט ובתרמילו) ויש אוסרים ליכנס בו בסכין ארוך או בראש מגולה:
6It is permitted to enter the synagogue with one's staff, traveling bag, or afunda (meaning, kinds of money-pouches/bags that are translated as yalkut and tarmil (specific types of bag)). There are some who forbid entering it with a long knife or with an uncovered head.
זיכול לרוק בו ובלבד שישפשפנו ברגליו או יהיה שם גמי שאם ירוק לתוכו לא יהא נראה:
7One may spit in it [i.e., the synagogue] as long as one rubs it out with one’s feet or if there are reeds/straw there [on the floor] that if one spits into them, it will not be visible.
חטיט שעל רגליו ראוי לקנחו קודם שיכנס להתפלל וראוי שלא יהא עליו ולא על בגדיו שום לכלוך:
8Mud that is on one's feet, it is appropriate to wipe it off when one enters to pray. And it is appropriate that there not be any dirt on one or on one’s clothing.
טנוהגים בהם כבוד לכבדן ולרבצן [פי' כבוד נקוי הבית. ריבוץ זריקת המים על פני הקרקע] ונוהגין להדליק בהם נרות לכבדן:
9We practice treating them [i.e., synagogues] with honor: to "chab'dan" and to "rav'tzan". (the meaning of "chibood" is to clean/sweep it. "Ribootz" is to sprinkle water on the ground). And we practice lighting candles in them to honor them.
יאפי' לאחר שחרבו עדיין הם בקדושתן וכשם שנוהגים בהם כבוד בישובן כך נוהגים בחרבנם חוץ מכבוד ורבוץ ואם עלו בהם עשבים תולשים אותם ומניחים אותם במקומן משום עגמת נפש כדי שיראו העם ותעיר רוחם וישתדלו לבנותה:
10Even after they [i.e., synagogues] have been destroyed, they remain in their [state of] holiness. And just as you practice honoring them when they were inhabited, so we practice when they are destroyed, except for [the aforementioned] sweeping and sprinkling water. If weeds grow in them, we pull them out and leave them in their place, for the sake of weigh down the soul - so that the people will see, and it will awaken their soul and they will try to rebuild it.
יאאם בשעת בנין ב"ה התנו עליו להשתמש בו מותר להשתמש בו בחרבנו אבל בישובו לא מהני תנאה ואפילו בחורבנו לתשמיש מגונה כגון זריעה וחשבונות של רבים לא מהני תנאה בד"א בבתי כנסיות שבחוצה לארץ אבל בבתי כנסיות שבא"י לא מהני שום תנאי:
11If at the time of building the synagogue, they made a condition to be able to use it [for mundane purposes], it is permitted to use it after it is destroyed, but while it is in use, the condition is ineffective. Even when it is destroyed, to use it for a disgraceful purpose, like planting or financial calculations for the people, the condition is ineffective. What are we dealing with? With synagogues outside of Israel; but with synagogues in Israel, no condition is effective.
יביש ליזהר מלהשתמש בעליות שעל גבי ב"ה תשמיש קבוע של גנאי כגון לשכב שם ושאר תשמישים יש להסתפק אם מותר להשתמש שם: הגה וכל זה דוקא בב"ה קבוע שנבנה מתחלה לכך אבל בית שיחדו לאחר שנבנה לב"ה מותר לשכב עליו (פסקי מהר"י):
12One should be careful not to use the floor above the synagogue for a regular use that is disrespectful. For instance, sleeping there. It is unclear if other uses are permissible or not. Rem"a: All of this is specifically regarding a permanent synagogue that was built originally like that, but a house that was designated to be a synagogue after it was built, it is permitted to sleep above it (Piskei Mahar"i).