Of course you do not really want this in, say, c-mode, so you might
want to use something like
(define-key LaTeX-mode-map [(control f5)] 'do-LaTeX)