table: Speed-up for `org-table-align'
* lisp/org-table.el (org-table-align): Use `org-table-to-lisp'. Suggested-by: Thierry Banel <tbanelwebmin@free.fr>
This commit is contained in:
parent
cd61eedddb
commit
13195a4a5f
|
@ -4349,11 +4349,8 @@ FIELD is a string. WIDTH is a number. ALIGN is either \"c\",
|
||||||
(let* ((indent (progn (looking-at "[ \t]*") (match-string 0)))
|
(let* ((indent (progn (looking-at "[ \t]*") (match-string 0)))
|
||||||
;; Table's rows as lists of fields. Rules are replaced
|
;; Table's rows as lists of fields. Rules are replaced
|
||||||
;; by nil. Trailing spaces are removed.
|
;; by nil. Trailing spaces are removed.
|
||||||
(fields (mapcar
|
(fields (mapcar (lambda (row) (and (listp row) row))
|
||||||
(lambda (l)
|
(org-table-to-lisp)))
|
||||||
(and (not (string-match-p org-table-hline-regexp l))
|
|
||||||
(org-split-string l "[ \t]*|[ \t]*")))
|
|
||||||
(split-string (buffer-substring beg end) "\n" t)))
|
|
||||||
;; Compute number of columns. If the table contains no
|
;; Compute number of columns. If the table contains no
|
||||||
;; field, create a default table and bail out.
|
;; field, create a default table and bail out.
|
||||||
(columns-number
|
(columns-number
|
||||||
|
|
Loading…
Reference in New Issue