diff options
author | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2015-10-26 16:58:34 +0100 |
---|---|---|
committer | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2015-10-26 16:58:34 +0100 |
commit | 77067142009f66b896b1692b1a425527a1dbd7b7 (patch) | |
tree | 47c76753176db430fe656d5c9b3f447f777fed5f | |
parent | 385f2381f913a0714310931a281aaf4c3b22e88e (diff) | |
download | org-mode-77067142009f66b896b1692b1a425527a1dbd7b7.tar.gz |
Switch some Babel-related libraries to lexical binding
* lisp/ob-sed.el:
* lisp/ob-shen.el:
(org-babel-execute:shen):
* lisp/ob-sql.el:
(org-babel-prep-session:sql):
* lisp/ob-sqlite.el:
(org-babel-execute:sqlite):
(org-babel-prep-session:sqlite):
* lisp/ob-stan.el:
(org-babel-prep-session:stan):
* lisp/ob-table.el: Switch some libraries to lexical binding.
-rw-r--r-- | lisp/ob-sed.el | 2 | ||||
-rw-r--r-- | lisp/ob-shen.el | 7 | ||||
-rw-r--r-- | lisp/ob-sql.el | 4 | ||||
-rw-r--r-- | lisp/ob-sqlite.el | 7 | ||||
-rw-r--r-- | lisp/ob-stan.el | 4 | ||||
-rw-r--r-- | lisp/ob-table.el | 2 |
6 files changed, 12 insertions, 14 deletions
diff --git a/lisp/ob-sed.el b/lisp/ob-sed.el index 9e3db37..8baa79e 100644 --- a/lisp/ob-sed.el +++ b/lisp/ob-sed.el @@ -1,4 +1,4 @@ -;;; ob-sed.el --- org-babel functions for sed scripts +;;; ob-sed.el --- Babel Functions for Sed Scripts -*- lexical-binding: t; -*- ;; Copyright (C) 2015 Free Software Foundation diff --git a/lisp/ob-shen.el b/lisp/ob-shen.el index 190d69b..a02acfc 100644 --- a/lisp/ob-shen.el +++ b/lisp/ob-shen.el @@ -1,4 +1,4 @@ -;;; ob-shen.el --- org-babel functions for Shen +;;; ob-shen.el --- Babel Functions for Shen -*- lexical-binding: t; -*- ;; Copyright (C) 2010-2015 Free Software Foundation, Inc. @@ -63,14 +63,13 @@ "Execute a block of Shen code with org-babel. This function is called by `org-babel-execute-src-block'" (require 'inf-shen) - (let* ((result-type (cdr (assoc :result-type params))) - (result-params (cdr (assoc :result-params params))) + (let* ((result-params (cdr (assoc :result-params params))) (full-body (org-babel-expand-body:shen body params))) (let ((results (with-temp-buffer (insert full-body) (call-interactively #'shen-eval-defun)))) - (org-babel-result-cond result-params + (org-babel-result-cond result-params results (condition-case nil (org-babel-script-escape results) (error results)))))) diff --git a/lisp/ob-sql.el b/lisp/ob-sql.el index a039613..a24fd8e 100644 --- a/lisp/ob-sql.el +++ b/lisp/ob-sql.el @@ -1,4 +1,4 @@ -;;; ob-sql.el --- org-babel functions for sql evaluation +;;; ob-sql.el --- Babel Functions for SQL -*- lexical-binding: t; -*- ;; Copyright (C) 2009-2015 Free Software Foundation, Inc. @@ -217,7 +217,7 @@ This function is called by `org-babel-execute-src-block'." vars) body) -(defun org-babel-prep-session:sql (session params) +(defun org-babel-prep-session:sql (_session _params) "Raise an error because Sql sessions aren't implemented." (error "SQL sessions not yet implemented")) diff --git a/lisp/ob-sqlite.el b/lisp/ob-sqlite.el index 18d7fc8..0cdda67 100644 --- a/lisp/ob-sqlite.el +++ b/lisp/ob-sqlite.el @@ -1,4 +1,4 @@ -;;; ob-sqlite.el --- org-babel functions for sqlite database interaction +;;; ob-sqlite.el --- Babel Functions for SQLite Databases -*- lexical-binding: t; -*- ;; Copyright (C) 2010-2015 Free Software Foundation, Inc. @@ -68,8 +68,7 @@ This function is called by `org-babel-execute-src-block'." (others (delq nil (mapcar (lambda (arg) (car (assoc arg params))) (list :header :echo :bail :column - :csv :html :line :list)))) - exit-code) + :csv :html :line :list))))) (unless db (error "ob-sqlite: can't evaluate without a database")) (with-temp-buffer (insert @@ -150,7 +149,7 @@ This function is called by `org-babel-execute-src-block'." (cons (car table) (cons 'hline (cdr table))) table)) -(defun org-babel-prep-session:sqlite (session params) +(defun org-babel-prep-session:sqlite (_session _params) "Raise an error because support for SQLite sessions isn't implemented. Prepare SESSION according to the header arguments specified in PARAMS." (error "SQLite sessions not yet implemented")) diff --git a/lisp/ob-stan.el b/lisp/ob-stan.el index 7891600..9e734e9 100644 --- a/lisp/ob-stan.el +++ b/lisp/ob-stan.el @@ -1,4 +1,4 @@ -;;; ob-stan.el --- org-babel functions for Stan +;;; ob-stan.el --- Babel Functions for Stan -*- lexical-binding: t; -*- ;; Copyright (C) 2015 Free Software Foundation, Inc. @@ -76,7 +76,7 @@ Otherwise, write the Stan code directly to the named file." (call-process-shell-command (concat "make " file)))) nil)) ; Signal that output has been written to file. -(defun org-babel-prep-session:stan (session params) +(defun org-babel-prep-session:stan (_session _params) "Return an error because Stan does not support sessions." (user-error "Stan does not support sessions")) diff --git a/lisp/ob-table.el b/lisp/ob-table.el index ec7450e..3461333 100644 --- a/lisp/ob-table.el +++ b/lisp/ob-table.el @@ -1,4 +1,4 @@ -;;; ob-table.el --- support for calling org-babel functions from tables +;;; ob-table.el --- Support for Calling Babel Functions from Tables -*- lexical-binding: t; -*- ;; Copyright (C) 2009-2015 Free Software Foundation, Inc. |