WASHINGTON (AP) _ As he comes closer and closer to being a former president, Ronald Reagan's thoughts seem to be turning to the men who have held the nation's highest office before him.

In recent speeches, Reagan has invoked the memory of Abraham Lincoln, John Quincy Adams, Lyndon Johnson and Theodore Roosevelt to make serious or humorous points, or both.

All presidents refer to their predecessors from time to time, either favorably or not.

By custom, each president gets to pick the pictures of former presidents that hang in the Cabinet Room. Reagan, for instance, replaced Harry S. Truman with Calvin Coolidge.

Now the president, who leaves office next Jan. 20, is quoting the wit and wisdom of presidents past, recalling how they dealt with the press and with their cabinets.

On March 22, addressing Republican local officials at the White House, Reagan related a story that he said Lincoln told when he found all but one of his Cabinet officers were against him on an issue.

The story was about a man who fell asleep during a revival meeting just before the minister said, ''All of you who are on the side of the Lord, stand up.''

As the man slept on, the minister intoned, ''All of you who are on the side of the devil, stand up.''

At that point the sleeper awoke, stood up and said, ''I didn't exactly understand the question, parson, but I'll stand by you to the end. It does seem we're in a hopeless minority.''

Reagan went on to tell the Republicans that they might be in a minority among city officials who claim the GOP has shorted them, but their views are ''the majority beliefs in this United States of America.''

On March 30, presiding at the swearing-in of William L. Ball III as secretary of the Navy, Reagan told one about Theodore Roosevelt.

T.R., he said, once told Saint Peter: ''Your choir is weak, inexcusably weak. You should reorganize it at once.''

Saint Peter says, ''All right,'' and gives T.R. the job.

''Well,'' said Roosevelt, ''I'll need 10,000 sopranos, 10,000 altos, and 10,000 tenors.''

''But what about the basses?'' asked Saint Peter.

''Don't worry about that,'' said T.R. ''I'll sing bass.''

Like Roosevelt, Reagan said, Ball's job now was to be ''a one-man bass section.''

On April 13, addressing the American Society of Newspaper Editors in Washington, Reagan told stories about John Quincy Adams and Lyndon Johnson and their dealings with the press.

''Every morning before dawn, Adams would hike down to the Potomac, strip off his clothes, and swim,'' he said. ''And one summer day, a woman of the press, under orders from her editor, followed him. And after he'd plunged into the water, she popped from the bushes, sat on his clothes, and demanded an interview. And she told him that if he tried to wade ashore, she'd scream. So Adams hld the first press conference up to his neck in water.

''I know how he felt.''

Of Johnson, he said that once when LBJ was coming off the Senate floor while he was vice president, he grabbed a reporter for The New York Times and shouted, ''You 3/8 I've been looking for you.''

Johnson pulled the reporter into his office, started haranguing him and then, about halfway through, scribbled a note, buzzed his secretary, and gave it to her.

The secretary returned with another note, which Johnson glanced at and threw away. When the reporter finally got away, he saw Johnson's note lying on a desk. It said, ''Who is this guy I'm talking to anyway?''

---

EDITOR'S NOTE - W. Dale Nelson covers the White House for The Associated Press.