0

This answer gave me the solution I needed. The only problem for me, is that I have to load it, namely fic-mode, manually. More explicitly, whenever I open a c++ file, I have to do M-x fic-mode and then M-x font-lock-fontify-buffer in order to have it really up and running. In my .emacs I have

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

but it doesn't do the trick.

Do you have any suggestions how to make it available automatically?

Community
  • 1
  • 1
Dror
  • 12,174
  • 21
  • 90
  • 160
  • That looks reasonable to me. Check the `*Messages*` for error messages, and if you don't see any, double-check that your C++ files are actually getting opened in C++ mode: `C-h m` – sanityinc Jun 21 '11 at 13:57
  • seems like moving around the `fic-mode` related part in my `.emacs` solved the issue. This is very vague solution... but it worked. – Dror Jun 22 '11 at 14:33
  • A stupid question: are you sure that your buffer is in c++-mode? – Thomas Jun 22 '11 at 21:58
  • @Thomas: As far as I can tell, then yes. At the bottom I can see a `C++` indicator. – Dror Jun 23 '11 at 05:38

1 Answers1

0

Try the following: create a new file containing the following three lines:

(setq load-path (cons "/path/to/fic-mode-directory" load-path))
(require 'fic-mode)
(add-hook 'c++-mode-hook 'turn-on-fic-mode)

Replace "/path/to/fic-mode-directory" with the absolute path to the directory in which you saved fic-mode.el.

Then from the command line, run

emacs -Q -l /path/to/file

where /path/to/file is the path to the above file.

Now type C-x C-f test.cpp.

Is fic-mode turned on in the resulting buffer?

Thomas
  • 17,016
  • 4
  • 46
  • 70
  • Oh, I didn't see that you already found a work-around. Perhaps you should close the question then. – Thomas Jun 23 '11 at 16:33