 ;; On Mac, this is effectively fn-M-backspace.
 (global-set-key (kbd "M-(") 'kill-word)
 (global-set-key (kbd "C-q") 'previous-buffer)
+(global-set-key (kbd "C-z") 'next-buffer)
 
 (define-key helm-grep-mode-map (kbd "<return>")  'helm-grep-mode-jump-other-window)
 (define-key helm-grep-mode-map (kbd "n")  'helm-grep-mode-jump-other-window-forward)

;; Automatically scroll build output.
(setq compilation-scroll-output t)
;; Automatically hide successful builds window.
(setq compilation-finish-functions 'ar-compile-autoclose)
(defun ar-compile-autoclose (buffer string)
  (cond ((string-match "finished" string)
         (message "Build finished")
         (run-with-timer 2 nil

        ("\\.mm$" (".h"))
        ))
(add-hook 'c-mode-common-hook (lambda() (local-set-key (kbd "C-c o") 'ff-find-other-file)))
(add-to-list 'auto-mode-alist '("\\.h\\'" . objc-mode))

(defun ar/kill-other-buffers ()
  "Kill all other buffers."
  (interactive)
  (mapc 'kill-buffer
        (delq (current-buffer)
              (remove-if-not 'buffer-file-name (buffer-list)))))

(defun ar/delete-this-buffer-and-file ()
  "Removes file connected to current buffer and kills buffer."
  (interactive)
  (let ((filename (buffer-file-name))
