McCain says he may not live long enough to see the book’s release date, May 22. He has glioblastoma, an aggressive brain cancer, though a recent visitor said he was full of fight and vigor.

My mother died of the same thing. One day, she was planning hikes in national parks in the Southwest and pruning lavender in the garden. Not long after, she was having trouble keeping down a milkshake, or turning over in bed. After we realized that further chemotherapy would just be cosmetic, and add pain to her final days, she chose the McCain route — reflection, planning, settling of personal accounts. She told her life story to my daughter, and wrote each of her seven kids a note, so that her words would outlive her.

For a public person, it’s different. Of course you want your words to be immortal, worthy of being chiseled onto a statue or invoked during heady debate. McCain has a political legacy, much of it good, some of it bad. Among other things, he will be remembered as a rare man of honor at a time when the current president has no honor.

But this is not about that legacy. It’s about a way for people to set things right in the closing days of life. “It is nothing to die,” wrote Victor Hugo. “It is frightful not to live.” You can look at it the other way as well.

Teddy Kennedy spoke of wanting “a good ending for myself.” He slipped away 15 months after a brain cancer diagnosis. In between, he finished a memoir of his life and passions, sailed, spent long hours with those who gave meaning to his life. His funeral was extraordinary. He was the only one of the four fabled Kennedy brothers who would die in old age, and he understood what that meant. “Every day is a gift,” he said in the dying light.