diff options
author | Aaron Ecay <aaronecay@gmail.com> | 2014-12-09 01:12:39 -0500 |
---|---|---|
committer | Aaron Ecay <aaronecay@gmail.com> | 2014-12-10 17:03:38 -0500 |
commit | f12e3d458978537e28719e911b46935634e06d55 (patch) | |
tree | 654019dcd56cbc7b6e5cac5ec3b66f85ec24a196 | |
parent | 53771153a216291c427bb286bc4b7cbc2b99b3ad (diff) | |
download | org-mode-f12e3d458978537e28719e911b46935634e06d55.tar.gz |
org-table: various small fixes
* lisp/org-table.el (org-table-rewrite-old-row-references): Rename function.
(org-table-eval-formula): Update caller.
(org-table--to-generic-cell): Fix typo in string constant.
(orgtbl-to-orgtbl): Properly respect params argument.
-rw-r--r-- | lisp/org-table.el | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/lisp/org-table.el b/lisp/org-table.el index 8f36d22..91f53ab 100644 --- a/lisp/org-table.el +++ b/lisp/org-table.el @@ -2672,7 +2672,7 @@ not overwrite the stored one." t t form))) ;; Check for old vertical references - (setq form (org-table-rewrite-old-row-references form)) + (org-table--error-on-old-row-references form) ;; Insert remote references (setq form (org-table-remote-reference-indirection form)) (while (string-match "\\<remote([ \t]*\\([-_a-zA-Z0-9]+\\)[ \t]*,[ \t]*\\([^\n)]+\\))" form) @@ -2939,10 +2939,9 @@ and TABLE is a vector with line types." desc cline) i))) -(defun org-table-rewrite-old-row-references (s) - (if (string-match "&[-+0-9I]" s) - (user-error "Formula contains old &row reference, please rewrite using @-syntax") - s)) +(defun org-table--error-on-old-row-references (s) + (when (string-match "&[-+0-9I]" s) + (user-error "Formula contains old &row reference, please rewrite using @-syntax"))) (defun org-table-make-reference (elements keep-empty numbers lispp) "Convert list ELEMENTS to something appropriate to insert into formula. @@ -4888,7 +4887,7 @@ information." ,(and hfmt `(headerp (setq contents ,(org-table--generic-apply hfmt ":hfmt" t 'contents)))) ,(and fmt `(t (setq contents ,(org-table--generic-apply - fmt ":hfmt" t 'contents)))))) + fmt ":fmt" t 'contents)))))) ;; If a separator is provided, use it instead of BACKEND's. ;; Separators are ignored when LFMT (or equivalent) is ;; provided. @@ -5027,7 +5026,7 @@ Useful when slicing one table into many. The :hline, :sep, :lstart, and :lend provide orgtbl framing. :tstart and :tend can be set to provide ORGTBL directives for the generated table." (require 'ox-org) - (orgtbl-to-generic table (org-combine-plists (list :backend 'org)))) + (orgtbl-to-generic table (org-combine-plists params (list :backend 'org)))) (defun orgtbl-to-table.el (table params) "Convert the orgtbl-mode TABLE into a table.el table. |