diff options
| author | Bastien Guerry | 2012-01-05 19:18:05 +0100 |
|---|---|---|
| committer | Bastien Guerry | 2012-01-05 19:18:05 +0100 |
| commit | d660637a805e793fc431c68b47af90994465a547 (patch) | |
| tree | 63bb8879e888e79c952c0fd43f28fb12b715fa88 | |
| parent | c74587e6b0c545eb4fb57654a79ca88ea14a6764 (diff) | |
| download | emacs-d660637a805e793fc431c68b47af90994465a547.tar.gz emacs-d660637a805e793fc431c68b47af90994465a547.zip | |
Fix some compiler warnings.
| -rw-r--r-- | lisp/org/ChangeLog | 7 | ||||
| -rw-r--r-- | lisp/org/ob-maxima.el | 6 | ||||
| -rw-r--r-- | lisp/org/ob.el | 32 |
3 files changed, 28 insertions, 17 deletions
diff --git a/lisp/org/ChangeLog b/lisp/org/ChangeLog index 0a59f1f837e..983df8a6bfc 100644 --- a/lisp/org/ChangeLog +++ b/lisp/org/ChangeLog | |||
| @@ -1,3 +1,10 @@ | |||
| 1 | 2012-01-05 Eric Schulte <eric.schulte@gmx.com> | ||
| 2 | |||
| 3 | * ob.el (org-babel-expand-noweb-references): Resurrect dropped | ||
| 4 | pieces of a previous patch. | ||
| 5 | |||
| 6 | * ob-maxima.el (org-babel-execute:maxima): Fix compiler warning. | ||
| 7 | |||
| 1 | 2012-01-05 Bastien Guerry <bzg@gnu.org> | 8 | 2012-01-05 Bastien Guerry <bzg@gnu.org> |
| 2 | 9 | ||
| 3 | * org-eshell.el (org-eshell-open): Use (goto-char (point-max)) | 10 | * org-eshell.el (org-eshell-open): Use (goto-char (point-max)) |
diff --git a/lisp/org/ob-maxima.el b/lisp/org/ob-maxima.el index 6955a778dd6..74bcb069434 100644 --- a/lisp/org/ob-maxima.el +++ b/lisp/org/ob-maxima.el | |||
| @@ -63,9 +63,9 @@ | |||
| 63 | "Execute a block of Maxima entries with org-babel. This function is | 63 | "Execute a block of Maxima entries with org-babel. This function is |
| 64 | called by `org-babel-execute-src-block'." | 64 | called by `org-babel-execute-src-block'." |
| 65 | (message "executing Maxima source code block") | 65 | (message "executing Maxima source code block") |
| 66 | (let ((result | 66 | (let ((result-params (split-string (or (cdr (assoc :results params)) ""))) |
| 67 | (let* ((result-params (split-string (or (cdr (assoc :results params)) ""))) | 67 | (result |
| 68 | (cmdline (cdr (assoc :cmdline params))) | 68 | (let* ((cmdline (cdr (assoc :cmdline params))) |
| 69 | (in-file (org-babel-temp-file "maxima-" ".max")) | 69 | (in-file (org-babel-temp-file "maxima-" ".max")) |
| 70 | (cmd (format "maxima --very-quiet -r 'batchload(%S)$' %s" | 70 | (cmd (format "maxima --very-quiet -r 'batchload(%S)$' %s" |
| 71 | in-file cmdline))) | 71 | in-file cmdline))) |
diff --git a/lisp/org/ob.el b/lisp/org/ob.el index ff5a8bc1d01..0288eb357b5 100644 --- a/lisp/org/ob.el +++ b/lisp/org/ob.el | |||
| @@ -2068,25 +2068,29 @@ block but are passed literally to the \"example-block\"." | |||
| 2068 | (if *org-babel-use-quick-and-dirty-noweb-expansion* | 2068 | (if *org-babel-use-quick-and-dirty-noweb-expansion* |
| 2069 | (while (re-search-forward rx nil t) | 2069 | (while (re-search-forward rx nil t) |
| 2070 | (let* ((i (org-babel-get-src-block-info 'light)) | 2070 | (let* ((i (org-babel-get-src-block-info 'light)) |
| 2071 | (body (org-babel-expand-noweb-references i))) | 2071 | (body (org-babel-expand-noweb-references i)) |
| 2072 | (if comment | 2072 | (full (if comment |
| 2073 | ((lambda (cs) | 2073 | ((lambda (cs) |
| 2074 | (concat (c-wrap (car cs)) "\n" | 2074 | (concat (c-wrap (car cs)) "\n" |
| 2075 | body "\n" (c-wrap (cadr cs)))) | 2075 | body "\n" |
| 2076 | (org-babel-tangle-comment-links i)) | 2076 | (c-wrap (cadr cs)))) |
| 2077 | (setq expansion (concat expansion body))))) | 2077 | (org-babel-tangle-comment-links i)) |
| 2078 | body))) | ||
| 2079 | (setq expansion (concat expansion full)))) | ||
| 2078 | (org-babel-map-src-blocks nil | 2080 | (org-babel-map-src-blocks nil |
| 2079 | (let ((i (org-babel-get-src-block-info 'light))) | 2081 | (let ((i (org-babel-get-src-block-info 'light))) |
| 2080 | (when (equal (or (cdr (assoc :noweb-ref (nth 2 i))) | 2082 | (when (equal (or (cdr (assoc :noweb-ref (nth 2 i))) |
| 2081 | (nth 4 i)) | 2083 | (nth 4 i)) |
| 2082 | source-name) | 2084 | source-name) |
| 2083 | (let ((body (org-babel-expand-noweb-references i))) | 2085 | (let* ((body (org-babel-expand-noweb-references i)) |
| 2084 | (if comment | 2086 | (full (if comment |
| 2085 | ((lambda (cs) | 2087 | ((lambda (cs) |
| 2086 | (concat (c-wrap (car cs)) "\n" | 2088 | (concat (c-wrap (car cs)) "\n" |
| 2087 | body "\n" (c-wrap (cadr cs)))) | 2089 | body "\n" |
| 2088 | (org-babel-tangle-comment-links i)) | 2090 | (c-wrap (cadr cs)))) |
| 2089 | (setq expansion (concat expansion body))))))))) | 2091 | (org-babel-tangle-comment-links i)) |
| 2092 | body))) | ||
| 2093 | (setq expansion (concat expansion full)))))))) | ||
| 2090 | expansion) | 2094 | expansion) |
| 2091 | ;; possibly raise an error if named block doesn't exist | 2095 | ;; possibly raise an error if named block doesn't exist |
| 2092 | (if (member lang org-babel-noweb-error-langs) | 2096 | (if (member lang org-babel-noweb-error-langs) |