Browse Source

Merge branch 'master' of orgmode.org:org-mode

Carsten Dominik 14 years ago
parent
commit
c2c28fc942
2 changed files with 3 additions and 2 deletions
  1. 2 1
      lisp/ob-tangle.el
  2. 1 1
      lisp/org-src.el

+ 2 - 1
lisp/ob-tangle.el

@@ -243,7 +243,8 @@ exported source code blocks by language."
        (org-babel-tangle-collect-blocks lang))
        (org-babel-tangle-collect-blocks lang))
       (message "tangled %d code block%s from %s" block-counter
       (message "tangled %d code block%s from %s" block-counter
                (if (= block-counter 1) "" "s")
                (if (= block-counter 1) "" "s")
-	       (file-name-nondirectory (buffer-file-name (current-buffer))))
+	       (file-name-nondirectory
+		(buffer-file-name (or (buffer-base-buffer) (current-buffer)))))
       ;; run `org-babel-post-tangle-hook' in all tangled files
       ;; run `org-babel-post-tangle-hook' in all tangled files
       (when org-babel-post-tangle-hook
       (when org-babel-post-tangle-hook
 	(mapc
 	(mapc

+ 1 - 1
lisp/org-src.el

@@ -153,7 +153,7 @@ but which mess up the display of a snippet in Org exported files.")
 (defcustom org-src-lang-modes
 (defcustom org-src-lang-modes
   '(("ocaml" . tuareg) ("elisp" . emacs-lisp) ("ditaa" . artist)
   '(("ocaml" . tuareg) ("elisp" . emacs-lisp) ("ditaa" . artist)
     ("asymptote" . asy) ("dot" . fundamental) ("sqlite" . sql)
     ("asymptote" . asy) ("dot" . fundamental) ("sqlite" . sql)
-    ("calc" . fundamental))
+    ("calc" . fundamental) ("C" . c))
   "Alist mapping languages to their major mode.
   "Alist mapping languages to their major mode.
 The key is the language name, the value is the string that should
 The key is the language name, the value is the string that should
 be inserted as the name of the major mode.  For many languages this is
 be inserted as the name of the major mode.  For many languages this is