C++ 组织模式未能突出显示C++;导出html时的源代码

C++ 组织模式未能突出显示C++;导出html时的源代码,c++,emacs,org-mode,C++,Emacs,Org Mode,我使用的是组织模式V7.8.09。当我试图将下面的C++代码块导出到HTML时, #+begin_src c++ int a=1; int b=1; printf("%d\n", a+b); #+end_src 它失败了,并显示了一条消息 org-babel-exp processing... font-lock-fontify-keywords-region: Symbol's value as variable is void: font-lock-end-statement-

我使用的是组织模式V7.8.09。当我试图将下面的C++代码块导出到HTML时,

#+begin_src c++
  int a=1;
  int b=1;
  printf("%d\n", a+b);
#+end_src
它失败了,并显示了一条消息

org-babel-exp processing...
font-lock-fontify-keywords-region: Symbol's value as variable is void: font-lock-end-statement-face`
有趣的是,如果我声称这是python代码,它将成功导出

#+begin_src python
  int a=1;
  int b=1;
  printf("%d\n", a+b);
#+end_src

< >在我的<代码> init .EL < />代码中添加了<代码>(orbabeldoBulelLoad)或orbabelLoad Load((c.t)),错误消息消失,C++代码可以成功地导出到HTML。但是C++代码没有突出显示,Python代码则被高亮显示。

< P>所需的包是Emacs/Lisp/org/OB-C.EL

< >不存在C++包

.emacs.el配置文件:

(org-babel-load-languages (C . t)))
(setq org-src-fontify-natively t)
组织文件:

#+BEGIN_SRC cpp   :includes <stdio.h> :exports both
 int a=1;
 int b=1;
 printf("%d\n", a+b);
#+END_SRC
#+BEGIN#SRC cpp:includes:导出两者
INTA=1;
int b=1;
printf(“%d\n”,a+b);
#+结束(SRC)
对于我来说,仅使用cpp源名称工作(fontify和running)


Candido

有趣的是,谷歌搜索变量名时只列出六个结果。所有的处理Python…尝试使用<代码> CPP < /C> >而不是<代码> C++ >代码>已经尝试过C++、C++、CPP、CPP、CPP,这些都没有工作:-(我不能复制这个。你的Emacs版本是什么?不能用org版本7.811,Emacs 24版本来复制。只需放<代码>(Stq-org Src FooTrror NT)在我的
~/.emacs
文件中,我可以在emacs 24.3.1上使用它