In this question I got to know fic-mode which highlights TODOs and such in c++ mode of emacs. However I couldn't make it auto-enabled; that is, I want it to be enabled as soon as I open a .cpp file. In my .emacs file I have:

(require 'fic-mode)
(add-hook 'c++-mode-hook 'turn-on-fic-mode) 

as recommended in the fic-mode.el. This doesn't do the trick. In order to enable the minor mode, I have to hit M-x fic-mode RET and then M-x font-lock-fontify-buffer. Can it be automated?


I see its working properly in my emacs. It may be with your .emacs. how about calling like this(I dont think it make any difference.)

(add-hook 'c++-mode-hook '(lambda () (fic-mode 1)))

its good to turn on debugger to see any errors. M-x toggle-debug-on-error. and open a cpp file.

  • Changing the .emacs didn't make a difference. Nothing popped up when the debugger was enabled. Problem is still there :( Thanks for the help! – Dror May 25 '11 at 8:45
  • does this turned on emacs -Q foo.cpp -l /path/to/fic-mode.el -f turn-on-fic-mode which version of emacs you are using? – kindahero May 25 '11 at 19:07
  • Yes, the above turns on the mode. But, I'm using Aquamacs, and I cannot (for some unclear reason) do something similar. The version I have is 2.2 with emacs 23.3.1. – Dror May 26 '11 at 6:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.