On Mac OS X Lion, Apple changed the behavior of MacBooks when closing the lid with an external monitor connected, this was a special change, as can be seen from the documentation:
support.apple.com/kb/ht3131This change completely abolished the ability to put the MacBook to sleep by simply closing the lid if an external display is connected and turning off the internal screen. User has no right to choose.
The other day
on the Apple forums , a solution finally appeared, returning behavior like in Snow Leopard.
In the terminal you need to do the following:
')
sudo nvram boot-args="iog=0x0"
After the reboot, the behavior will change, now with the connected external display closing the lid will put the laptop to sleep. And if you wake it up with an external usb device and open it, the internal display will remain off.
On Air3.2, this solution works.
You can return it back like this:
sudo nvram -d boot-args
Just in case, if something goes wrong, then you can reset the nvram values at boot time by holding down command + option + p + r.