Explorar o código

babel: More concise matlab/octave code template

Patch by Christopher Long
Dan Davison %!s(int64=15) %!d(string=hai) anos
pai
achega
2d1025298e
Modificáronse 1 ficheiros con 2 adicións e 7 borrados
  1. 2 7
      contrib/babel/lisp/langs/org-babel-octave.el

+ 2 - 7
contrib/babel/lisp/langs/org-babel-octave.el

@@ -111,13 +111,8 @@ then create. Return the initialized session."
 
 (defvar org-babel-octave-wrapper-method
    "%s
-if ischar(ans)
-   fid = fopen('%s', 'w')
-   fprintf(fid, '%%s', ans)
-   fprintf(fid, '\\n')
-   fclose(fid)
-else
-   save -ascii %s ans
+if ischar(ans), fid = fopen('%s', 'w'); fprintf(fid, '%%s\\n', ans); fclose(fid);
+else, save -ascii %s ans
 end")
 
 (defvar org-babel-octave-eoe-indicator "\'org_babel_eoe\'")