(transient-mark-mode nil) does not work in Emacs 24. Use 0 instead of nil.