org.el: Exclude tables in src and example blocks.

* org.el (org-table-map-tables): Exclude tables in src and
example blocks.

Thansk to Sebastian for reporting this.
This commit is contained in:
Bastien Guerry 2012-04-09 17:27:32 +02:00
parent 1a8a39d2df
commit c3cf7b1476
1 changed files with 3 additions and 1 deletions

View File

@ -3945,7 +3945,9 @@ If TABLE-TYPE is non-nil, also check for table.el-type tables."
(unless quietly
(message "Mapping tables: %d%%" (/ (* 100.0 (point)) (buffer-size))))
(beginning-of-line 1)
(when (looking-at org-table-line-regexp)
(when (and (looking-at org-table-line-regexp)
;; Exclude tables in src/example/verbatim/clocktable blocks
(not (org-in-block-p '("src" "example"))))
(save-excursion (funcall function))
(or (looking-at org-table-line-regexp)
(forward-char 1)))