summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Goaziou <mail@nicolasgoaziou.fr>2017-08-19 12:13:26 +0200
committerNicolas Goaziou <mail@nicolasgoaziou.fr>2017-08-19 12:13:26 +0200
commita65ddb0228bc32857385da93d239ccd99a261bfa (patch)
tree76908c692857acc13bc634c7a52572b3d28ff529
parenta5dbedea06ebe66ac71bc52e977624b0ab5a0783 (diff)
downloadorg-mode-a65ddb0228bc32857385da93d239ccd99a261bfa.tar.gz
org-table: Fix table alignment
* lisp/org-table.el (org-table-align): Fix table alignment.
-rw-r--r--lisp/org-table.el4
1 files changed, 2 insertions, 2 deletions
diff --git a/lisp/org-table.el b/lisp/org-table.el
index ff2cce5..07f4b40 100644
--- a/lisp/org-table.el
+++ b/lisp/org-table.el
@@ -809,7 +809,7 @@ When nil, simply write \"#ERROR\" in corrupted fields.")
;; Find fields that are wider than FMAX, and shorten them.
(when fmax
(dolist (x column)
- (when (> (org-string-width x) fmax)
+ (when (> (string-width x) fmax)
(org-add-props x nil
'help-echo
(concat
@@ -837,7 +837,7 @@ edit. Full value is:\n"
(list 'display org-narrow-column-arrow)
x))))))
;; Get the maximum width for each column
- (push (apply #'max (or fmax 1) 1 (mapcar #'org-string-width column))
+ (push (or fmax (apply #'max 1 (mapcar #'org-string-width column)))
lengths)
;; Get the fraction of numbers among non-empty cells to
;; decide about alignment of the column.