FILE - In this Dec. 1, 2014 file photo, Attorney General Eric Holder speaks at Ebenezer Baptist Church in Atlanta. (David Goldman/AP)

THERE HAS been a welcome evolution by Attorney General Eric H. Holder Jr. on the issue of government interrogation and investigation of reporters. The new approach reflects more thought and balance than the administration’s earlier efforts. Mr. Holder’s final actions before leaving office do not entirely ease worries about leak investigations, but they do show that Mr. Holder was listening to reasonable objections and willing to change.

On Wednesday, Mr. Holder announced revisions in Justice Department guidelines for issuing subpoenas and search warrants to journalists or for their newsgathering materials. The revisions are being made to an earlier update of the guidelines, an effort that followed the uproar over leak investigations involving the Associated Press and Fox News. The new revisions reflect nearly a year’s discussions between the Justice Department and a coalition of news organizations and journalists, including the Reporters Committee for Freedom of the Press, the Newspaper Association of America, the Associated Press and this newspaper, among others.

The most important result is a change in what the guidelines apply to. As drafted earlier, they would apply only to “ordinary newsgathering,” raising a question: Did that mean some other kind of newsgathering would enjoy less protection? Mr. Holder has now corrected this language. The guidelines, which will apply to all newsgathering, ensure that any effort to get records or testimony from journalists must be approved by the attorney general.

A second indicator of rethinking is federal prosecutors’ decision to abandon a long and worrisome effort to compel the testimony of New York Times reporter James Risen about his sources. Mr. Risen properly resisted attempts by the government to force him to identify who provided information about an intelligence operation detailed in a chapter of his 2006 book, “State of War.” Prosecutors wanted his testimony in their case against Jeffrey Sterling, a former CIA official who is now on trial, accused of leaking details of the failed operation against Iran’s nuclear program.

Using such confidential sources is an essential tool by which reporters gather information and hold government to account, and that is a basic element of democracy. Undoubtedly, there will always be tension in the relationship between a government’s need for secrecy and the desire of journalists to pull away the veil. A balance is necessary, and it can be best preserved if the tools that journalists use, including confidential sources, are protected.

These actions cannot change recent history: This administration has conducted the most far-reaching campaign against leaks in recent memory, not a record to be admired. Much will depend going forward on how the guidelines are followed. But it is heartening that Mr. Holder, as he prepares to step down, has taken steps to protect the freedom to report.