Bilal al-Absi (may Allah have mercy on him) said: When there was a death in his family, Sayyiduna Hudhayfah (may Allah be pleased with him) would not inform anyone of it, and he would say: "I fear that it would be na'y (announcing the death); I heard the Messenger of Allah (peace and blessings be upon him) forbid na'y."
This is also narrated from Ibn Mas'ud, Ibn Umar and Abu Sa'id (may Allah be pleased with them), and then from Alqamah, Ibn al-Musayyib, al-Rabi' bin Khuthaym and Ibrahim al-Nakha'i (may Allah have mercy on them). It has reached me that Malik bin Anas (may Allah have mercy on him) said: I do not like crying out about a man's death at the doors of the mosques; but if someone stood at the study circles in the mosques and informed the people of his death, there would be no harm in it.
It has been narrated to us from Sayyiduna Anas bin Malik (may Allah be pleased with him) that the Prophet (peace and blessings be upon him) announced the death of Ja'far, Zayd and Ibn Rawahah (may Allah be pleased with them); and from Sayyiduna Abu Hurayrah (may Allah be pleased with him) that the Prophet (peace and blessings be upon him) announced the death of the Negus (al-Najashi); and from him, concerning the death of the person who used to sweep the mosque and was buried at night: "Why did you not inform me?" And in one narration: "What prevented you from letting me know?"
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الجنائز / 7179
Ibn Rafi' narrates from his grandmother that Sayyiduna Rafi' bin Khadij (may Allah be pleased with him) died after Asr. Sayyiduna Ibn Umar (may Allah be pleased with them both) was informed of his death, and it was said to him: What do you think, should his funeral be taken out now? Sayyiduna Ibn Umar (may Allah be pleased with them both) said: The funeral of a man like Rafi' cannot be taken out until it has been announced in the villages around us; so wait until morning and then take out his funeral.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الجنائز / 7180
Sayyiduna Abu Sa'id al-Khudri (may Allah be pleased with him) said: When the Prophet (peace and blessings be upon him) had first come (to Madinah), whenever one of us was near death, we would inform him (peace and blessings be upon him). He (peace and blessings be upon him) would come and seek forgiveness for him. When he died, he (peace and blessings be upon him) and his companions would leave; sometimes he (peace and blessings be upon him) would sit until he was buried, and sometimes this staying of his (peace and blessings be upon him) became long. When we feared the hardship of this for him (peace and blessings be upon him), some of the people said to others: Why do we not inform him (peace and blessings be upon him) only when a person has died? Then when he died, we would inform him (peace and blessings be upon him), and there would be no hardship for him (peace and blessings be upon him) in it, nor would he (peace and blessings be upon him) have to stay long. So we informed him (peace and blessings be upon him) after the deceased had died. He (peace and blessings be upon him) would come and pray the funeral prayer; sometimes he (peace and blessings be upon him) would leave, and sometimes he would stay until the deceased was buried. We continued doing so for a while. Then we said: If we do not trouble him (peace and blessings be upon him), and instead carry the funeral to him (peace and blessings be upon him) so that he (peace and blessings be upon him) prays over it near his house, that will be easier for him (peace and blessings be upon him). So we did that, and the matter has remained so to this day.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الجنائز / 7181