        (file-name-directory fPath)))
     (message "File path copied: %s" fPath)))
 
+(use-package flycheck
+  :ensure t)
+
+;; Override default flycheck triggers
+(setq flycheck-check-syntax-automatically
+      '(save idle-change mode-enabled)
+      flycheck-idle-change-delay 0.8)
+
+(setq flycheck-display-errors-function
+      #'flycheck-display-error-messages-unless-error-list)
+
+(add-hook 'after-init-hook #'global-flycheck-mode)
+
 ;; Prevent inadvertently editing invisible areas in Org.
 (setq org-catch-invisible-edits t)
 


;;  From http://doc.rix.si/org/fsem.html
(defun ar/gnulinuxp ()
  "Returns t if the system is a GNU/Linux machine, otherwise nil"
  (string-equal system-type "gnu/linux"))

(defun ar/osxp ()
  "Returns t if the system is a Mac OS X machine, otherwise nil"
  (string-equal system-type "darwin"))

(defun ar/cygwinp ()
  "Returns t if Emacs is running inside of Cygwin on Windows, otherwise nil"
  (string-equal system-type "cygwin"))

(defun ar/windowsp ()
  "Returns t if the system is a native Emacs for Windows, otherwise nil"
  (string-equal system-type "windows"))

;; New browser tab.

(global-set-key (kbd "C-c `") 'ar/jump-to-saved-point)

(defun ar/after-prog-mode-text-change (beg end len)
  "Execute for all text modifications in `prog-mode'.
Argument BEG beginning.
Argument END end.
Argument LEN Length."
  ;; Saving point to register enables jumping back to last change at any time.
  (ar/save-point))

(defun ar/objc-mode-hook-function ()
  "Called when entering `objc-mode'."
  (helm-dash-activate-docset "iOS")
  (set (make-local-variable 'company-backends)
       ;; List with multiple back-ends for mutual inclusion.
