0
0
Fork 1
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2024-08-25 02:02:52 +00:00

org-latex: check for protection before wrapping ": " lines as verbatim

* lisp/org-latex.el (org-export-latex-fixed-width): check for
  protection before wrapping ": " lines as verbatim
This commit is contained in:
Eric Schulte 2010-06-27 19:36:14 -07:00
parent a8a26f245b
commit da8fffa5a4

View file

@ -1537,6 +1537,7 @@ The conversion is made depending of STRING-BEFORE and STRING-AFTER."
"When OPT is non-nil convert fixed-width sections to LaTeX." "When OPT is non-nil convert fixed-width sections to LaTeX."
(goto-char (point-min)) (goto-char (point-min))
(while (re-search-forward "^[ \t]*:\\([ \t]\\|$\\)" nil t) (while (re-search-forward "^[ \t]*:\\([ \t]\\|$\\)" nil t)
(org-if-unprotected
(if opt (if opt
(progn (goto-char (match-beginning 0)) (progn (goto-char (match-beginning 0))
(insert "\\begin{verbatim}\n") (insert "\\begin{verbatim}\n")
@ -1549,8 +1550,7 @@ The conversion is made depending of STRING-BEFORE and STRING-AFTER."
(while (looking-at "^\\([ \t]*\\):\\(\\([ \t]\\|$\\).*\\)$") (while (looking-at "^\\([ \t]*\\):\\(\\([ \t]\\|$\\).*\\)$")
(replace-match (concat "%" (match-string 1) (replace-match (concat "%" (match-string 1)
(match-string 2)) t t) (match-string 2)) t t)
(forward-line)))))) (forward-line)))))))
(defvar org-table-last-alignment) ; defined in org-table.el (defvar org-table-last-alignment) ; defined in org-table.el
(defvar org-table-last-column-widths) ; defined in org-table.el (defvar org-table-last-column-widths) ; defined in org-table.el