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

kostafey opened this Issue Feb 26, 2013 · 2 comments


None yet
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.


tarsius commented May 13, 2013

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: https://github.com/tarsius/hl-todo. 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 May 13, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment