   ;; Saving point to register enables jumping back to last change at any time.
   (ar/save-point))
 
+(defun ar/objc-mode-hook ()
+  "Called when entering objc-mode"
+  (set (make-local-variable 'company-backends)
+       ;; List with multiple back-ends for mutual inclusion.
+       '((company-yasnippet
+          company-gtags
+          company-dabbrev-code
+          company-files)))
+  ;; List targets with xcodebuild -list
+  ;; List SDKS with xcodebuild -sdk -version, for example:
+  ;; iPhoneSimulator7.1.sdk - Simulator - iOS 7.1 (iphonesimulator7.1)
+  ;; SDKVersion: 7.1
+  ;; Path: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.1.sdk
+  ;; PlatformPath: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform
+  ;; ProductBuildVersion: 11D167
+  ;; ProductCopyright: 1983-2014 Apple Inc.
+  ;; ProductName: iPhone OS
+  ;; ProductVersion: 7.1
+  (setq compile-command "xcodebuild -sdk iphonesimulator7.1 -target MyTarget")
+  (define-key objc-mode-map [f6] 'recompile)
+  (define-key objc-mode-map [f7] 'ar/xc:build)
+  (define-key objc-mode-map [f8] 'ar/xc:run))
+(add-hook 'objc-mode-hook 'ar/objc-mode-hook)
+
 (defun ar/java-mode-hook ()
   "Called when entering java-mode"
   ;; 100-column limit for java.

(bind-key "M-t M-t" 'transpose-words)
(bind-key "M-t s" 'transpose-sexps)

;; Alternative to grepping repo.
(bind-key "C-c s r" 'helm-ag-r-from-git-repo)
;; Alternative to grepping from current location.
(bind-key "C-c s d" 'helm-ag-r)

(use-package hackernews
  :ensure hackernews)


(objc-font-lock-global-mode)
(setq objc-font-lock-background-face nil)

;; No Objective-C 'other file' support out of the box. Fix that.
(setq cc-other-file-alist
      `(("\\.cpp$" (".hpp" ".h"))
