|
@@ -1668,22 +1668,23 @@ When it is nil, all comments will be removed."
|
|
|
"Remove tables lines that are used for internal purposes."
|
|
|
(goto-char (point-min))
|
|
|
(while (re-search-forward "^[ \t]*|" nil t)
|
|
|
- (beginning-of-line 1)
|
|
|
- (if (or (looking-at "[ \t]*| *[!_^] *|")
|
|
|
- (not
|
|
|
- (memq
|
|
|
- nil
|
|
|
- (mapcar
|
|
|
- (lambda (f)
|
|
|
- (or (= (length f) 0)
|
|
|
- (string-match
|
|
|
- "\\`<\\([0-9]\\|[rl]\\|[rl][0-9]+\\)>\\'" f)))
|
|
|
- (org-split-string ;; FIXME, can't we do this without splitting???
|
|
|
- (buffer-substring (point-at-bol) (point-at-eol))
|
|
|
- "[ \t]*|[ \t]*")))))
|
|
|
- (delete-region (max (point-min) (1- (point-at-bol)))
|
|
|
- (point-at-eol))
|
|
|
- (end-of-line 1))))
|
|
|
+ (org-if-unprotected-at (1- (point))
|
|
|
+ (beginning-of-line 1)
|
|
|
+ (if (or (looking-at "[ \t]*| *[!_^] *|")
|
|
|
+ (not
|
|
|
+ (memq
|
|
|
+ nil
|
|
|
+ (mapcar
|
|
|
+ (lambda (f)
|
|
|
+ (or (= (length f) 0)
|
|
|
+ (string-match
|
|
|
+ "\\`<\\([0-9]\\|[rl]\\|[rl][0-9]+\\)>\\'" f)))
|
|
|
+ (org-split-string ;; FIXME, can't we do without splitting???
|
|
|
+ (buffer-substring (point-at-bol) (point-at-eol))
|
|
|
+ "[ \t]*|[ \t]*")))))
|
|
|
+ (delete-region (max (point-min) (1- (point-at-bol)))
|
|
|
+ (point-at-eol))
|
|
|
+ (end-of-line 1)))))
|
|
|
|
|
|
(defun org-export-protect-sub-super (s)
|
|
|
(save-match-data
|