It's not by Twain, but probably by Judge Gideon J Tucker.
Although appropriated for libertarian purposes, it had nothing to do with that, but came from a case summary. A widow whose husband had died intestate had been given bad legal advice by an attorney. Tucker was pointing out that the error had happened because the attorney had failed to note relevant legislative changes to inheritance law.
The error arose from want of diligent watchfulness in respect to legislative changes. He did not remember that it might be necessary to look at the statutes of the year before. Perhaps he had forgotten the saying, that “no man’s life, liberty, or property are safe while the Legislature is in session.”
-- Gideon J. Tucker, Final Accounting in the Estate of A.B. (1866)
Although Tucker quotes it as an existing saying, the Yale Dictionary of Quotations notes that his is the first findable citation, so he deserves credit as the originator.
Law Notes, Volume 5, 1902. This link should work if you're in the USA: http://books.google.co.uk/books?id=WXwqAAAAYAAJ&dq=%22The+error+arose+from+want+of+diligent+watchfulness%22&ei=ExTESqS4MKfCyASwy9X4Aw&client=firefox-a
You can quote them, Yale Alumni Magazine: http://www.yalealumnimagazine.com/issues/2009_07/arts_quotations_068.html
The Big Apple, citing Yale Book of Quotations: http://www.barrypopik.com/index.php/new_york_city/entry/no_mans_life_liberty_or_property_are_safe_while_the_legislature_is_in_sessi/
· 10 years ago