From 32afb61b87ecc7547a5a20ff3da03b97e9f745f0 Mon Sep 17 00:00:00 2001 From: Nicolas Goaziou Date: Sun, 22 Jan 2012 22:00:44 +0100 Subject: [PATCH] org-e-latex: Fix variable shadowing * EXPERIMENTAL/org-e-latex.el (org-e-latex-table--format-string): Now accept three arguments. (org-e-latex-table--align-string, org-e-latex-table): Distinguish between the communication channel (INFO) and informations about table (TABLE-INFO). --- EXPERIMENTAL/org-e-latex.el | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/EXPERIMENTAL/org-e-latex.el b/EXPERIMENTAL/org-e-latex.el index 386e49ee2..e6266d18a 100644 --- a/EXPERIMENTAL/org-e-latex.el +++ b/EXPERIMENTAL/org-e-latex.el @@ -1678,11 +1678,12 @@ contextual information." ;;;; Table -(defun org-e-latex-table--format-string (table info) +(defun org-e-latex-table--format-string (table table-info info) "Return an appropriate format string for TABLE. -INFO is the plist containing format info about the table, as -returned by `org-export-table-format-info'. +TABLE-INFO is the plist containing format info about the table, +as returned by `org-export-table-format-info'. INFO is a plist +used as a communication channel. The format string one placeholder for the body of the table." (let* ((label (org-element-get-property :name table)) @@ -1692,7 +1693,7 @@ The format string one placeholder for the body of the table." (org-element-get-property :attr_latex table) " ")) ;; Determine alignment string. - (alignment (org-e-latex-table--align-string attr info)) + (alignment (org-e-latex-table--align-string attr table-info)) ;; Determine environment for the table: longtable, tabular... (table-env (cond ((not attr) org-e-latex-default-table-environment) @@ -1748,20 +1749,20 @@ The format string one placeholder for the body of the table." (concat (if org-e-latex-table-caption-above "" caption) (format "\n\\end{%s}" float-env)))))))) -(defun org-e-latex-table--align-string (attr info) +(defun org-e-latex-table--align-string (attr table-info) "Return an appropriate LaTeX alignment string. ATTR is a string containing table's LaTeX specific attributes. -INFO is the plist containing format info about the table, as -returned by `org-export-table-format-info'." +TABLE-INFO is the plist containing format info about the table, +as returned by `org-export-table-format-info'." (or (and attr (string-match "\\