Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

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

Closed
kostafey opened this Issue · 2 comments

2 participants

@kostafey

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
                          '(("AEK:?\\|FIXME:\\|TODO:\\|BUG:" 
                             0 'font-lock-warning-face t))))

(add-hook 'font-lock-mode-hook     ; Make fixme tags standout
          'font-lock-warn-todo)
@kostafey

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
Owner

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