forked from mirrors/org-mode
org-table.el: Fix usage of user-error
* lisp/org-table.el (org-table-convert-region): Don't use `if' because Elisp has no concept of continuable errors.
This commit is contained in:
parent
bf1c4c7575
commit
e626185081
|
@ -861,9 +861,9 @@ nil When nil, the command tries to be smart and figure out the
|
|||
(let* ((beg (min beg0 end0))
|
||||
(end (max beg0 end0))
|
||||
re)
|
||||
(if (> (count-lines beg end) org-table-convert-region-max-lines)
|
||||
(when (> (count-lines beg end) org-table-convert-region-max-lines)
|
||||
(user-error "Region is longer than `org-table-convert-region-max-lines' (%s) lines; not converting"
|
||||
org-table-convert-region-max-lines)
|
||||
org-table-convert-region-max-lines))
|
||||
(when (equal separator '(64))
|
||||
(setq separator (read-regexp "Regexp for field separator")))
|
||||
(goto-char beg)
|
||||
|
@ -906,7 +906,7 @@ nil When nil, the command tries to be smart and figure out the
|
|||
(while (re-search-forward re end t)
|
||||
(replace-match "| " t t)))
|
||||
(goto-char beg)
|
||||
(org-table-align))))
|
||||
(org-table-align)))
|
||||
|
||||
;;;###autoload
|
||||
(defun org-table-import (file separator)
|
||||
|
|
Loading…
Reference in New Issue