.emacs File for CS1

The following is the content of my emacs configuration file for CS1. From your home directory (~/) create/edit a file called .emacs ("emacs .emacs" from the terminal).
;;;; File: .emacs
;;; Author: Joshua T. Guerin
;;; Purpose: .emacs file for CS1 server
;;; Last Edited: Spring 2014

;;; Syntax highlighting isn't enabled by default.
;;; Enable highlighting with font-lock-mode.
(global-font-lock-mode 1)

;;; Disable welcome screen
(setq inhibit-startup-message t)

;;; FOR FLYSPELL MODE ;;;
(autoload 'flyspell-mode "flyspell" "On-the-fly spelling checker." t)

;;; Add hooks for common programming languages
(add-hook 'c-mode-common-hook 'flyspell-prog-mode)
(add-hook 'c++-mode-common-hook 'flyspell-prog-mode)
(add-hook 'emacs-lisp-mode-hook 'flyspell-prog-mode)
(add-hook 'html-mode-hook 'flyspell-prog-mode)
(add-hook 'java-mode-hook 'flyspell-prog-mode)
(add-hook 'javascript-mode-hook 'flyspell-prog-mode)
(add-hook 'latex-mode-hook 'flyspell-prog-mode)
(add-hook 'message-mode-hook 'turn-on-flyspell)
(add-hook 'pearl-mode-hook 'flyspell-prog-mode)
(add-hook 'prolog-mode-hook 'flyspell-prog-mode)
(add-hook 'python-mode-hook 'flyspell-prog-mode)
(add-hook 'text-mode-hook 'turn-on-flyspell)

;;; Force flyspell mode in non-programming modes
(defun turn-on-flyspell ()
   "Force flyspell-mode on using a positive arg.  For use in hooks."
   (interactive)
   (flyspell-mode 1))

;;; END OF CODE FOR FLYSPELL MODE;;;
	    


Note: Flyspell (based on ispell) may not be available on OS X machines by default. For spellcheck on your local machine with OS X I have the following additional entry before the rest of the flyspell-mode code (you may need to install aspell):
;;;Use aspell for flyspell mode (needed for OS X)
(setq ispell-program-name "/sw/bin/aspell")