This LISP routine from Kent Cooper improves on AutoCAD's built-in Layer Isolate and Layer Unisolate commands. The built-in commands are generally designed to work as a set: You isolate certain layers, make changes to geometry, then unisolate the layers. Nesting of the layer isolation states is not supported, and older versions of Layer Unisolate would even undo layer property changes that were made while layers were isolated.
Kent's version allows for nesting, allows for manual layer control while in the isolated state, and ignores layer property changes when restoring the layers. It also reports what it is doing at the Command line — another feature lacking in the built-in commands. Great job, Kent.