סימן קצט סעיף טז
בֵּית הַקְּבָרוֹת, אֵין נוֹהֲגִין בּוֹ קַלּוּת רֹאשׁ, מִפְּנֵי כְּבוֹדָן שֶׁל הַמֵּתִים, כְּגוֹן לֶאֱכֹל וְלִשְׁתּוֹת שָׁם אוֹ לְהִפָּנוֹת שָׁם. וְאֵין מַרְעִין שָׁם בְּהֵמוֹת, וְלֹא יְלַקֵּט מִמֶּנוּ עֲשָׂבִים. אֲבָל אִילָנוֹת הַנְּטוּעִין בְּבֵית הַקְּבָרוֹת וְאֵינָן עַל הַקְּבָרִים, מֻתָּר לְלַקֵּט פֵּרוֹתֵיהֶ.
In the cemetery, you should not indulge in levity, out of respect to the dead. This means you may not eat or drink there, or respond to nature's call. And you may not allow cattle to graze there, and not gather the vegetation that grows there. However, if trees are planted in a cemetery and do not grow over the graves, it is permitted to pick their fruit.
תנא דבי אליהו כל השונה הלכות בכל יום מובטח לו שהוא בן העולם הבא שנאמר הליכות עולם לו אל תקרי הליכות אלא הלכות (נדה ע"ג.)