Can. 1184 --- 1.) Unless they have given some signs of repentance before their death, the following are to be deprived of ecclesiasitical funeral rites:
1* notorious apostates, heretics and schismatics;
2* persons who had chosen the cremation of their bodies for reasons opposed to the Christian faith;
3* other manifest sinners for whom ecclesiastical funeral rites cannot be granted without public scandal to the faithful.
2.) If some doubt should arise, the local ordinary is to be consulted; and his judgment is to be followed.
Can. 1185 --- Any funeral Mass whatsover is also to be denied a person excluded from ecclesiastical funeral rites.
A very, public sinner who held tightly to views that were against the doctrinal teachings of the Church was recently given a Requiem Mass. A canon lawyer interpreted that the correct thing to do was to give this man a Mass. His reason, however, was not because the local ordinary had agreed it was the right thing to do, but he based his reasoning purely on a very liberal, and recent modernistic interpretation of Canon 1184, Section 1:
"See, e.g., J. Manzanares, [commentary on Canon 1184], in L. Echeverria, ed., Codigo de Derecho Canonico: Edicion Bilingue Comentada, 5th ed., (1985) at 574, wherein: "Those [manifest sinners] are no longer considered unworthy who, before death, give some sign of repentance. Moreover, this clause should receive a benign interpretation. A sign of repentance could be not only calling for a confessor, asking publicly for the forgiveness of God, or kissing a crucifix, etc., and could also be gleaned, despite one's otherwise irregular situation, by giving clear signs of adhesion to the Church, for example, by collaborating in its works, sending children to catechism, or participating themselves in ecclesiastical initiatives whenever possible." "
This canon lawyer took a liberal view of this (above) interpretation of canon law. If we look at the whole of Section 1 of Canon 1184, we see the intent that first consideration is to the level of scandal of the schism made by the sinner. In other words, was this a public heretic, therefore, any public Mass would be a sin to the public by giving public scandal (misleading the faithful into thinking that one can necessarily be saved by being a heretic). The second consideration is to the fact of whether or not a "sign of repentance" can be gleamed from an act by the sinner just prior to his death. In the spiritual economy of restitution, it has always been the teachings of Holy Mother Church that if a sin is public, the restitution must be public. But while a dying person may not have the opportunity for appropriate restitution, the "sign of repentance" must be according to one's means. In other words, if the public sinner publicly asked for God's forgiveness, or even publicly kissed a Crucifix, this would have sufficed, giving a "benign interpretation". Benign, however, does not mean blindly liberal.
If someone is in the public eye they have the means to convey a message to the public. Repentance of public sin would be insufficient if it was private, when public means was clearly available.
If your neighbor, out of a poor understanding of God's laws and/or natural laws, decided to not give you back the lawnmower he borrowed from you, and later was repentant about it, he could tell a priest he was sorry, but restitution would still need to be made. The priest would tell him to return the lawnmower. If this was impossible because it had since broke, or he sold it, or he was on his deathbed, he would still have to give some sort of sign of restitution, according to his ability.
A sinner who has the means to make restitution, in prudence, is obligated to do so. If the local ordinary says, "Well, you're going to die in another month or so, so don't worry about making restitution; we believe you're repentant" they are doing a grave spiritual disservice to the sinner. Restitution is for the sinner's salvation, not an arbitrary appointment by the Church. It is a sign of repentance in response to the grace of one being sorry for having offended God and having hurt one's neighbor to boot, and appropriate repentance must be made whenever possible. The effects of public sins are public, and any person truly sorry for a public sin would want to make restitution as a sign of repentance not despite the fact that they are dying but all the more so because they are dying.
I do pray and hope that the local ordinary for the late Senator Edward Kennedy gave him first a remittance of his his excommunication, after receiving his word that he no longer held unto his pro-abortion beliefs. Assuming all this was true, and that it was also physically impossible for Mr. Kennedy to then publicly recant his pro-abortion position, and gave an appropriate sign of repentance according to his public heresy and resulting excommunication ipso facto, then and only then would it have been appropriate for the local ordinary to have agreed on granting Mr. Kennedy a public, funeral Mass.
Unfortunately, it doesn't appear that was the case.
Note: True mercy is borne of true charity; and true charity is borne out of love of God, and to neighbor for the love of God (not the other way around; love comes from God, and supernaturalized love was given to us at the expense of Christ's blood). This life is merely a means. Any ordinary that caters first to the human condition at the expense of a person(s)' salvation do a grave disservice to the sinner (and to the public would would receive the scandal), and give dishonor to God. "The path to hell is lined with good intentions."
Edward Kennedy, Requiescat in pace.
Additional reading: Human Life International's Comments by Fr. Euteneuer