Backport commit 6a60701bb from Emacs

* lisp/org-table.el (org-table-finish-edit-field):
Further improvement of regexp, as suggested by Paul Eggert.

Improve regexp in org-table-finish-edit-field
6a60701bba3d87f5d9a1730e18b6da827f41a062
Mattias Engdegård
Thu Apr 16 19:53:10 2020 +0200
This commit is contained in:
Mattias Engdegård 2020-04-16 19:40:26 +02:00 committed by Kyle Meyer
parent 989a51105c
commit e69937ddac
1 changed files with 1 additions and 1 deletions

View File

@ -2063,7 +2063,7 @@ the table and kill the editing buffer."
text)
(goto-char (point-min))
(while (re-search-forward "^#.*\n?" nil t) (replace-match ""))
(while (re-search-forward "[ \t]*\\(?:\n[ \t]*\\)+" nil t)
(while (re-search-forward "[ \t]*\n[ \t\n]*" nil t)
(replace-match " "))
(setq text (org-trim (buffer-string)))
(set-window-configuration cw)