Merge branch 'maint'

This commit is contained in:
Nicolas Goaziou 2012-01-31 20:23:07 +01:00
commit 646b3f846a
1 changed files with 7 additions and 5 deletions

View File

@ -1730,10 +1730,11 @@ from the buffer."
":[ \t]*\\(.*\\)") nil t) ":[ \t]*\\(.*\\)") nil t)
(if (not (eq backend org-export-current-backend)) (if (not (eq backend org-export-current-backend))
(delete-region (point-at-bol) (min (1+ (point-at-eol)) (point-max))) (delete-region (point-at-bol) (min (1+ (point-at-eol)) (point-max)))
(let ((ind (get-text-property (point-at-bol) 'original-indentation)))
(replace-match "\\1\\2" t) (replace-match "\\1\\2" t)
(add-text-properties (add-text-properties
(point-at-bol) (min (1+ (point-at-eol)) (point-max)) (point-at-bol) (min (1+ (point-at-eol)) (point-max))
`(org-protected t original-indentation ,ind org-native-text t)))) `(org-protected t original-indentation ,ind org-native-text t)))))
;; Delete #+ATTR_BACKEND: stuff of another backend. Those ;; Delete #+ATTR_BACKEND: stuff of another backend. Those
;; matching the current backend will be taken care of by ;; matching the current backend will be taken care of by
;; `org-export-attach-captions-and-attributes' ;; `org-export-attach-captions-and-attributes'
@ -1748,7 +1749,8 @@ from the buffer."
(while (re-search-forward (concat "^[ \t]*#\\+BEGIN_" backend-name "\\>.*\n?") (while (re-search-forward (concat "^[ \t]*#\\+BEGIN_" backend-name "\\>.*\n?")
nil t) nil t)
(setq beg (match-beginning 0) beg-content (match-end 0)) (setq beg (match-beginning 0) beg-content (match-end 0))
(setq ind (save-excursion (goto-char beg) (org-get-indentation))) (setq ind (or (get-text-property beg 'original-indentation)
(save-excursion (goto-char beg) (org-get-indentation))))
(when (re-search-forward (concat "^[ \t]*#\\+END_" backend-name "\\>.*\n?") (when (re-search-forward (concat "^[ \t]*#\\+END_" backend-name "\\>.*\n?")
nil t) nil t)
(setq end (match-end 0) end-content (match-beginning 0)) (setq end (match-end 0) end-content (match-beginning 0))