I have a laptop (Acer TravelMate 8471), which I connect to an external monitor, keyboard etc. when I'm at home.
When I unplug my laptop, I have to remember to go to the Monitor Preferences and turn off the external monitor, and turn on my laptop monitor, otherwise X will crash.
When I plug my external monitor to my laptop, it will automatically switch to that one without any troubles.
I'm running 10.10, and I have an intel graphics card (GMA 4500 I think; i915).