 (setq user-full-name "Jeff McCarrell")
 (setq user-mail-address "jeff@mccarrell.org")
 
+;; prefer utf-8 encoding in all cases.
+(prefer-coding-system 'utf-8)
+(set-terminal-coding-system 'utf-8)
+(set-keyboard-coding-system 'utf-8)
+
 ;; always show syntax highlighting
 (when (fboundp 'global-font-lock-mode)
   (global-font-lock-mode t))

(put 'eval-expression 'disabled nil)
(put 'narrow-to-region 'disabled nil)
(put 'downcase-region 'disabled nil)

;;; on OS X, set binding for meta to be command key, next to space bar
(when (eq 'darwin system-type)
  (setq mac-command-key-is-meta t)
  (setq mac-command-modifier 'meta)
  (setq mac-option-modifier nil))

;;; set up some key bindings
(define-key global-map "\C-xy" 'revert-buffer)

  (require 'yaml-mode)
  (add-to-list 'auto-mode-alist '("\\.yml$" . yaml-mode)))

;;; on OS X, set binding for meta to be command key, next to space bar
;;;  disable meaning of option key, so it is passed into emacs.
;;;  I use these semantics so that, e.g., option-v gives me the square root character.
;;;
;;; I have had this code much higher in this init file; however, I run into eval order
;;;  issues.  When I leave it here late in the sequence, it seems to do what I want.
(when (and window-system (eq 'ns window-system))
  (set-variable (quote mac-option-modifier) 'none))

