Brian Williams invited the fury of Twitter on Tuesday when, during MSNBC's coverage of the first joint campaign appearance of Hillary Clinton and President Obama, he commented on the president's "delivery."

"The president was being urged by one member of the crowd to preach," Williams observed on the telecast. "He seemingly tried to at one point — borrowing almost a Richard Pryor delivery to deliver the degree of his disgust and disdain for the other side, the comments clearly aimed at Donald Trump."

For reference, here's Obama on the stump for Hillary Clinton in Charlotte:

And here's Pryor performing a stand-up routine in 1974:

Williams's comparison between the president and the comedian, who died in 2005, struck some viewers as racist — and they let him know on social media.

What did Williams mean? It certainly appears that he was getting at what linguists refer to as "code-switching" — changing the way you talk, depending on the audience. NPR has a podcast series devoted to the subject; it's called "Code Switch," of course.

Obama talked about his habit of code-switching in an interview with NPR during his first White House run:

I think that there's a certain black idiom that it's hard not to slip into when you're talking to a black audience because of the audience response. It's the classic call and response. Anybody who's spent time in a black church knows what I mean. And so you get a little looser; it becomes a little more like jazz and a little less like a set score.

Media outlets have noted Obama's variable speech patterns, too. A few examples:

Slate (2010): Obama's knack for tweaking how he talks — or code-switching, in linguistics terminology — was on display during the campaign and after. At fundraisers in New York, he'd put on his professorial lilt. In front of mostly black audiences in South Carolina, he'd warn them against believing rumors that he was a Muslim. "They try to bamboozle you, hoodwink you," he said, in a deliberate homage to Malcolm X.
Gawker (2012): Yes, Obama speaks differently in front of black crowds than he does in front of mostly white audiences, which includes the American public at large.
New York Times (2012): Two aspects of President Obama's acceptance speech to the Democratic National Convention on Thursday night were of linguistic interest. The first was "signifying" — the use of indirect humor as critique, and a much discussed feature of black speech. "My opponent and his running mate are ... new ... to foreign policy," he said, adding the two pauses for great comedic effect. The second, and more familiar, was the soaring crescendo, beginning with "in the words of Scripture, ours is a future filled with hope," in which Mr. Obama demonstrated his strongest mode of linguistic performance — the black preacher style — to end his remarks ("knowing that providence is with us and that we are surely blessed").

Unsurprisingly, Obama is not the only politician who code-switches. In fact, when Clinton ran against Obama in the 2008 Democratic primary, the former first lady of Arkansas acknowledged her own propensity for slipping into a Southern drawl in certain settings. That got media attention, too.

So it's not that code-switching in general — or Obama's code-switching, in particular — is some kind of third rail for journalists. It's that the way journalists address the subject that makes a difference. There was no outcry in 2007 with NPR's Steve Inskeep posed the frank question that elicited Obama's explanation of "a certain black idiom."

"Do you try to talk in the same way to a black audience as a white audience?" Inskeep asked.

Williams, on the other hand, took a more oblique approach — "almost a Richard Pryor delivery" — and drew fire.

Donald Trump must be watching the reaction to Williams's remark and smiling. In his way of thinking, Williams is a victim of political correctness here, though Trump probably won't speak up in the anchor's defense, given their history. On Election Night 2012, Williams read on the air a series of tweets in which Trump called Obama's victory a "sham" and a "travesty." Williams then declared that "Donald Trump has driven well past the last exit to relevance and veered into something closer to irresponsible." The real estate mogul fired back, naturally.

While he surely enjoys seeing Williams take heat, Trump almost as surely loves the idea that a prominent member of the allegedly liberal media is feeling the wrath of PC culture — and perhaps thinking that the presumptive Republican presidential nominee has a point about its overzealousness.