     (font-lock-add-keywords
      nil
      '((my-c-mode-font-lock-if0 (0 font-lock-comment-face prepend))) 'add-to-end)
-    (setq fill-column 100)))
+    (setq fill-column 90)))
 
 (add-hook 'c-mode-common-hook 'my-c-mode-common-hook)
 

        smtpmail-smtp-server "mail.messagingengine.com"
        smtpmail-smtp-service 587))

(when (not (kelly?))
  (when (equal system-type 'gnu/linux)
    (add-to-list 'load-path "/usr/share/emacs/site-lisp/mu4e"))
  (when (equal system-type 'darwin)
    (setq mu4e-mu-binary "/usr/local/bin/mu")
    (add-to-list 'load-path "/usr/local/share/emacs/site-lisp/mu4e"))
  (when (equal system-type 'gnu/linux)
    (setq mu4e-mu-binary "/usr/bin/mu"))
  (require 'mu4e)
  (when (fboundp 'imagemagick-register-types)
    (imagemagick-register-types))
  (setq epa-file-cache-passphrase-for-symmetric-encryption t
        mu4e-maildir "~/Maildir"
        mu4e-drafts-folder "/INBOX.Drafts"
        mu4e-sent-folder   "/INBOX.Sent"
        mu4e-trash-folder  "/INBOX.Trash"
        mu4e-maildir-shortcuts
        '( ("/INBOX"         . ?i)
           ("/INBOX.Sent"    . ?s)
           ("/INBOX.Trash"   . ?t)
           ("/INBOX.Archive" . ?a))
        mu4e-bookmarks '(((concat "flag:unread"
                                  " AND NOT flag:trashed"
                                  " AND NOT maildir:/INBOX.Trash"
                                  " AND NOT maildir:/INBOX.Spam")
                          "Unread messages"      ?u)
                         ("date:today..now"                  "Today's messages"     ?t)
                         ("date:7d..now"                     "Last 7 days"          ?w)
                         ("mime:image/*"                     "Messages with images" ?p)
                         ("size:2M..500M"                    "Big messages"         ?b))
        mu4e-get-mail-command "offlineimap -q"
        mu4e-update-interval 300
        mu4e-view-show-images t
        mu4e-html2text-command "w3m -T text/html"
        mu4e-headers-skip-duplicates t
        user-mail-address "capak@inputwish.com"
        user-full-name  "Libor Čapák"
        mail-signature nil
        mail-signature-file nil
        message-signature nil
        mu4e-compose-signature nil
        mu4e-compose-signature-auto-include nil
        mu4e-sent-message-behaviour 'delete
        mu4e-hide-index-messages t
        mu4e-view-show-addresses t
        mu4e-date-format-long "%d.%m.%Y"
        mu4e-headers-date-format "%d.%m.%y"
        mu4e-confirm-quit nil
        message-kill-buffer-on-exit t)
  ;; (setq mu4e-use-fancy-chars t)
  ;; (set-face-attribute 'mu4e-unread-face nil
  ;;                     :inherit font-lock-preprocessor-face
  ;;                     :bold t)
  (defun mu4e-msgv-action-view-in-browser (msg)
    "View the body of the message in a web browser."
    (interactive)
    (let ((html (mu4e-msg-field (mu4e-message-at-point t) :body-html))
          (tmpfile (format "%s/%d.html" temporary-file-directory (random))))
      (unless html (error "No html part for this message"))
      (with-temp-file tmpfile
        (insert
         "<html>"
         "<head><meta http-equiv=\"content-type\""
         "content=\"text/html;charset=UTF-8\">"
         html))
      (browse-url (concat "file://" tmpfile))))
  (add-to-list 'mu4e-view-actions
               '("View in browser" . mu4e-msgv-action-view-in-browser) t)
  (defun mu4e-move-to-spam ()
    (interactive)
    (mu4e-mark-set 'move "/INBOX.Spam")
    (mu4e-headers-next))
  (define-key mu4e-headers-mode-map (kbd "c") 'mu4e-move-to-spam)
  (global-set-key (kbd "C-c m") 'mu4e))

(use-package mu4e-alert
  :if (not (kelly?))
  :init
  (setq mu4e-alert-interesting-mail-query
        (concat "flag:unread"
                " AND NOT flag:trashed"
                " AND NOT maildir:/INBOX.Trash"
                " AND NOT maildir:/INBOX.Spam"))
  (add-hook 'after-init-hook #'mu4e-alert-enable-mode-line-display))

(defun my-c-mode-font-lock-if0 (limit)
  (save-restriction

  (setq helm-ag-base-command "ag --smart-case --nocolor --nogroup")
  (setq helm-ag-insert-at-point 'symbol)
  (add-hook 'helm-ag-mode-hook (lambda () (grep-mode))))

;; TODO: semantic + projectile, ggtags + projectile

(use-package projectile
  :diminish projectile-mode
