diff options
author | Sébastien Delafond <sdelafond@gmail.com> | 2014-08-27 12:01:58 +0200 |
---|---|---|
committer | Sébastien Delafond <sdelafond@gmail.com> | 2014-08-27 12:01:58 +0200 |
commit | 8d289dcd7c74256e70fb25a8f0368f95558728ad (patch) | |
tree | 26e7390159f18c9132641f6b7d4cc022d9c0005a /lisp/ox-ascii.el | |
parent | 2a3fafe515c0dd1c15b5dcae0ba6c8be34606a1a (diff) | |
parent | f57fab831252ebe5037ceabe9843623c4bd14f15 (diff) |
Merge tag 'upstream/8.2.7c'
Upstream version 8.2.7c
Diffstat (limited to 'lisp/ox-ascii.el')
-rw-r--r-- | lisp/ox-ascii.el | 33 |
1 files changed, 19 insertions, 14 deletions
diff --git a/lisp/ox-ascii.el b/lisp/ox-ascii.el index b4efa53..4a6696e 100644 --- a/lisp/ox-ascii.el +++ b/lisp/ox-ascii.el @@ -1665,20 +1665,25 @@ are ignored." (or (gethash key cache) (puthash key - (or (and (not org-ascii-table-widen-columns) - (org-export-table-cell-width table-cell info)) - (let* ((max-width 0)) - (org-element-map table 'table-row - (lambda (row) - (setq max-width - (max (string-width - (org-export-data - (org-element-contents - (elt (org-element-contents row) col)) - info)) - max-width))) - info) - max-width)) + (let ((cookie-width (org-export-table-cell-width table-cell info))) + (or (and (not org-ascii-table-widen-columns) cookie-width) + (let ((contents-width + (let ((max-width 0)) + (org-element-map table 'table-row + (lambda (row) + (setq max-width + (max (string-width + (org-export-data + (org-element-contents + (elt (org-element-contents row) col)) + info)) + max-width))) + info) + max-width))) + (cond ((not cookie-width) contents-width) + (org-ascii-table-widen-columns + (max cookie-width contents-width)) + (t cookie-width))))) cache)))) (defun org-ascii-table-cell (table-cell contents info) |