Loading fic-mode in emacs
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 开发者_如何学Goit 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?
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?
精彩评论