diff options
author | rasmus <rasmus@gmx.us> | 2013-07-13 16:30:04 +0200 |
---|---|---|
committer | Eric Schulte <schulte.eric@gmail.com> | 2013-07-13 10:35:34 -0600 |
commit | 6727f1aa755a819a92d34ce7f09b0f8327d6a9b3 (patch) | |
tree | 85de32fe30b1c44c8046332ce94bc8b45f67b3f7 | |
parent | 0c233ae4e961d005aff02106242368b6f08b32ea (diff) | |
download | org-mode-6727f1aa755a819a92d34ce7f09b0f8327d6a9b3.tar.gz |
Better C++ recognition
* ob-C.el: Added =C++= to =`org-babel-load-languages'=
automatically after loading =C=.
* org-src.el (org-src-lang-modes): Added association between
language =C++= and =`c++-mode'=.
=C++= is added to org-babel-load-languages to make
`org-babel-demarcate-block' recognize =C++= as a proper language.
-rw-r--r-- | lisp/ob-C.el | 2 | ||||
-rw-r--r-- | lisp/org-src.el | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/lisp/ob-C.el b/lisp/ob-C.el index e9eec93..b0eaf6f 100644 --- a/lisp/ob-C.el +++ b/lisp/ob-C.el @@ -39,6 +39,8 @@ (defvar org-babel-tangle-lang-exts) (add-to-list 'org-babel-tangle-lang-exts '("C++" . "cpp")) +(let ((x (member '(C . t) org-babel-load-languages))) + (setcdr x (cons '(C++ . t) (subseq x 1)))) (defvar org-babel-default-header-args:C '()) diff --git a/lisp/org-src.el b/lisp/org-src.el index 81b8e40..0f88174 100644 --- a/lisp/org-src.el +++ b/lisp/org-src.el @@ -179,7 +179,7 @@ but which mess up the display of a snippet in Org exported files.") (defcustom org-src-lang-modes '(("ocaml" . tuareg) ("elisp" . emacs-lisp) ("ditaa" . artist) ("asymptote" . asy) ("dot" . fundamental) ("sqlite" . sql) - ("calc" . fundamental) ("C" . c) ("cpp" . c++) + ("calc" . fundamental) ("C" . c) ("cpp" . c++) ("C++" . c++) ("screen" . shell-script)) "Alist mapping languages to their major mode. The key is the language name, the value is the string that should |