סימן יג סעיף א
קְדֻשַּׁת בֵּית הַכְּנֶסֶת וּבֵית הַמִּדְרָשׁ גְּדוֹלָה מְאֹד, וּמֻזְהָרִים עֲלֵיהֶם לִירֹא מִמִּי שֶׁהוּא שׁוֹכֵן בָּהֶם יִתְבָּרַךְ שְׁמוֹ, כְּדִכְתִיב, וּמִקְדָּשִׁי תִּירָאוּ. וּבֵית הַכְּנֶסֶת וּבֵית הַמִּדְרָשׁ נִקְרָאִים גַּם כֵּן מִקְדָּשׁ, כְּדִכְתִיב, וָאֱהִי לָהֶם לְמִקְדָּשׁ מְעַט, וְדָרְשֵׁינַן אֵלּוּ בָּתֵּי כְנֵסִיּוֹת וּבָתֵּי מִדְרָשׁוֹת. וְלָכֵן אָסוּר לְדַבֵּר בָּהֶם דְּבָרִים בְּטֵלִים. וְאֵין מְחַשְּׁבִין בָּהֶם חֶשְׁבּוֹנוֹת אֶלָּא שֶׁל מִצְוָה. כְּגוֹן קֻפָּה שֶׁל צְדָקָה וְכַדּוֹמֶה. וְנוֹהֲגִין בָּהֶם כָּבוֹד לְכַבְּדָם וּלְרַבְּצָם, וּמַדְלִיקִין בָּהֶם נֵרוֹת לְכָבוֹד. אֵין לְנַשֵּׁק בָּהֶם בָּנָיו הַקְּטַנִּים, שֶׁאֵינוֹ רָאוּי לְהַרְאוֹת שָׁם אַהֲבָה אַחֶרֶת זוּלַת אַהֲבַת הַשֵּׁם יִתְבָּרַךְ שְׁמוֹ (צ"ח קנ"א).
The sanctity of a synagogue and Beis Midrash is very great, and we are commanded to fear the One Who dwells in them, blessed be His Name; as it is written, "Revere My Sanctuary."1Leviticus 19:30. A Synagogue and Beis Midrash are also called "Sanctuaries," as it is written: "I will be to them as a miniature Sanctuary"2Ezekiel 11:16. and it is explained that this refers to the Synagogue and the Batei Midrash. Therefore, it is forbidden to engage there in idle talk, or to make calculations, except those that pertain to a mitzvah, such as the calculations of charity funds, or the like. Such places must be treated with respect, they must be kept meticulously clean, and candles must be lit in them to show our respect. You should not kiss your small children there, because it is not proper to demonstrate any other love except the love of Hashem, blessed be His Name.
תנא דבי אליהו כל השונה הלכות בכל יום מובטח לו שהוא בן העולם הבא שנאמר הליכות עולם לו אל תקרי הליכות אלא הלכות (נדה ע"ג.)