]> code.delx.au - gnu-emacs/blobdiff - lisp/org/ob-mscgen.el
Update copyright year to 2015
[gnu-emacs] / lisp / org / ob-mscgen.el
index 3b55f2e27b3e9684a883a0474c253f41ce376ebb..6d57210c34e42cf0aee0b9f324342580ea606b2f 100644 (file)
@@ -1,11 +1,10 @@
 ;;; ob-msc.el --- org-babel functions for mscgen evaluation
 
-;; Copyright (C) 2010-201 Free Software Foundation, Inc.
+;; Copyright (C) 2010-2015 Free Software Foundation, Inc.
 
 ;; Author: Juan Pechiar
 ;; Keywords: literate programming, reproducible research
 ;; Homepage: http://orgmode.org
-;; Version: 7.4
 
 ;; This file is part of GNU Emacs.
 
@@ -25,7 +24,7 @@
 ;;; Commentary:
 ;;
 ;; This software provides EMACS org-babel export support for message
-;; sequence charts. The mscgen utility is used for processing the
+;; sequence charts.  The mscgen utility is used for processing the
 ;; sequence definition, and must therefore be installed in the system.
 ;;
 ;; Mscgen is available and documented at
@@ -56,7 +55,6 @@
 
 ;;; Code:
 (require 'ob)
-(require 'ob-eval)
 
 (defvar org-babel-default-header-args:mscgen
   '((:results . "file") (:exports . "results"))
 (defun org-babel-execute:mscgen (body params)
   "Execute a block of Mscgen code with Babel.
 This function is called by `org-babel-execute-src-block'.
-Default filetype is png. Modify by setting :filetype parameter to
+Default filetype is png.  Modify by setting :filetype parameter to
 mscgen supported formats."
   (let* ((out-file (or (cdr (assoc :file params)) "output.png" ))
          (filetype (or (cdr (assoc :filetype params)) "png" )))
     (unless (cdr (assoc :file params))
       (error "
-ERROR: no output file specified. Add \":file name.png\" to the src header"))
+ERROR: no output file specified.  Add \":file name.png\" to the src header"))
     (org-babel-eval (concat "mscgen -T " filetype " -o " out-file) body)
-    out-file))
+    nil)) ;; signal that output has already been written to file
 
 (defun org-babel-prep-session:mscgen (session params)
   "Raise an error because Mscgen doesn't support sessions."
@@ -82,4 +80,5 @@ ERROR: no output file specified. Add \":file name.png\" to the src header"))
 (provide 'ob-mscgen)
 
 
+
 ;;; ob-msc.el ends here