I used to use an addon called EZDismount a while back that did exactly this, but I eventually ditched it because it seemed like it kicked me off my mount too much. But since the patch, the AutoDismount seems to be working perfectly-- it saved me tons of clicks farming herbs while flying around (and towing my orphan behind-- what can I say, I'm a multitasker). I don't know if Blizzard has theirs set up differently, because I haven't used the old addon in so long, but so far it just seems to work better.
But I do realize that not everybody likes it, and unfortunately, it seems the checkbox only seems to work for flying mounts-- AutoDismount is set on by default for all ground mounts now. If you want to turn it off for all mounts (so that you get an error message, just like before, when you try to cast a spell while mounted), you can simply type this: /console autoDismount 0. That, we're told by Slouken, the UI blue guy, is all you need to type in once, and it's set off for all mounts. I'd assume to turn it back on, you just type /console autoDismount 1. And there's a few helpful dismount macros in that thread as well-- you can use a hotbutton to select a random mount in your inventory, or use a hotbutton to turn on or off AutoDismount (if, for example, you want to use it in battlegrounds, but not in PvE). Interesting stuff. I'll be autodismounting, I'm sure, but with all that info, it's good to know that you have control over when you get on and off your mounts.