Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP


diff color highlighting conflicts with font-lock-mode-hook. #569

kostafey opened this Issue · 2 comments

2 participants


When I added the following lines to my .emacs file, the color highlighting in
magit diff is disappeared:

(defun font-lock-warn-todo ()
  (font-lock-add-keywords nil
                             0 'font-lock-warning-face t))))

(add-hook 'font-lock-mode-hook     ; Make fixme tags standout

I'm using:

  • Magit Version 20130222.1729
  • GNU Emacs 24.2.1 (i386-mingw-nt5.1.2600) of 2012-08-29 on MARVIN

Without font-lock-mode-hook colors in diffs works well.


You should add font-lock-warn-todo to the appropriate programming and text mode hooks, not to font-lock-mode-hook.

Just for you I have written a minor mode to do so hl-todo (just kidding I wrote it for myself). You can find it here: The library header contains pointers to other existing implementations and the relevant page on the Emacswiki.

Edit: it seems I can never get these damn markdown links right - total org-mode damage.

@tarsius tarsius closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.