summaryrefslogtreecommitdiff
path: root/lisp/org-src.el
diff options
context:
space:
mode:
authorSebastien Delafond <seb@debian.org>2013-10-27 17:14:14 +0100
committerSébastien Delafond <sdelafond@gmail.com>2014-07-13 13:35:29 +0200
commitd3ee0b02baea9e4e066ed16145ba076165d8a696 (patch)
treefdb3661e3284a5d42637a562216e29ac4edd40d4 /lisp/org-src.el
parent44bbf7eace0d917b5deb7a2ee74ef2927e095b3c (diff)
parent40ce6b75e6245659a3a14622356e32e7dd1125dd (diff)
Imported Debian patch 8.2.1-1
Diffstat (limited to 'lisp/org-src.el')
-rw-r--r--lisp/org-src.el4
1 files changed, 3 insertions, 1 deletions
diff --git a/lisp/org-src.el b/lisp/org-src.el
index 81b8e40..062d2d7 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
@@ -757,6 +757,8 @@ with \",*\", \",#+\", \",,*\" and \",,#+\"."
(delete-region beg (max beg end))
(unless (string-match "\\`[ \t]*\\'" code)
(insert code))
+ ;; Make sure the overlay stays in place
+ (when (eq context 'save) (move-overlay ovl beg (point)))
(goto-char beg)
(if single (just-one-space))))
(if (memq t (mapcar (lambda (overlay)