I can't think of an easy software solution just offhand (though I'm sure one exists) however I can think of an easy way to implement this in hardware.
Build a flip-flop circuit configured to output a pulse on the falling edge of the input signal. Use the vehicles switched +12 as the input. Presuming that the circuit in question is also powered by switched +12, put enough capacitor on its supply to hold it for a second after the power goes away.
Solder a pair of wires across the laptop's power button. Connect these wires to the output of an optoisolator, whose input is driven by the aforementioned circuit.
Set the laptop to shut down on a press of the power button.
CAR: 2007 G35 Sport Coupe 5AT
HARDWARE: Dell D630 w/ dock, internal 80G HD, internal 320G HD, Verizon Wireless Card, iBlue GM-2 GPS w/iGuidance, OBDPros w/DashCommand, Visteon HD Radio w/ Home Made Cable, Current Version of RR w/ DFX Skin. My Install.
No need to install any software... just go into your power settings in the control panel, go to the Alarms tab... slide the low battery alarm slider all the way to 100%, click the Alarm Action button and select your options.
I have mine to go into standby when the battery is at 100%... with these settings, the laptop basically goes into standby right when the AC is pulled...