Merge branch 'master' into next

This commit is contained in:
Nicolas Goaziou 2018-11-26 19:53:15 +01:00
commit 229ed4b475
2 changed files with 16 additions and 5 deletions

View File

@ -3912,7 +3912,18 @@ element it has to parse."
((looking-at "%%(") ((looking-at "%%(")
(org-element-diary-sexp-parser limit affiliated)) (org-element-diary-sexp-parser limit affiliated))
;; Table. ;; Table.
((looking-at "[ \t]*\\(|\\|\\+\\(-+\\+\\)+[ \t]*$\\)") ((or (looking-at "[ \t]*|")
;; There is no strict definition of a table.el
;; table. Try to prevent false positive while being
;; quick.
(let ((rule-regexp "[ \t]*\\+\\(-+\\+\\)+[ \t]*$")
(next (line-beginning-position 2)))
(and (looking-at rule-regexp)
(save-excursion
(forward-line)
(re-search-forward "^[ \t]*\\($\\|[^|]\\)" limit t)
(and (> (line-beginning-position) next)
(org-match-line rule-regexp))))))
(org-element-table-parser limit affiliated)) (org-element-table-parser limit affiliated))
;; List. ;; List.
((looking-at (org-item-re)) ((looking-at (org-item-re))

View File

@ -19825,7 +19825,8 @@ object (e.g., within a comment). In these case, you need to use
(cond (cond
;; In a table, call `org-table-next-row'. However, before first ;; In a table, call `org-table-next-row'. However, before first
;; column or after last one, split the table. ;; column or after last one, split the table.
((or (and (eq (org-element-type context) 'table) ((or (and (eq 'table (org-element-type context))
(not (eq 'table.el (org-element-property :type context)))
(>= (point) (org-element-property :contents-begin context)) (>= (point) (org-element-property :contents-begin context))
(< (point) (org-element-property :contents-end context))) (< (point) (org-element-property :contents-end context)))
(org-element-lineage context '(table-row table-cell) t)) (org-element-lineage context '(table-row table-cell) t))
@ -19851,9 +19852,8 @@ object (e.g., within a comment). In these case, you need to use
(call-interactively #'org-open-at-point)) (call-interactively #'org-open-at-point))
;; Insert newline in heading, but preserve tags. ;; Insert newline in heading, but preserve tags.
((and (not (bolp)) ((and (not (bolp))
(save-excursion (beginning-of-line) (let ((case-fold-search nil))
(let ((case-fold-search nil)) (org-match-line org-complex-heading-regexp)))
(looking-at org-complex-heading-regexp))))
;; At headline. Split line. However, if point is on keyword, ;; At headline. Split line. However, if point is on keyword,
;; priority cookie or tags, do not break any of them: add ;; priority cookie or tags, do not break any of them: add
;; a newline after the headline instead. ;; a newline after the headline instead.