diff options
author | Carsten Dominik <carsten.dominik@gmail.com> | 2009-09-24 10:27:30 +0100 |
---|---|---|
committer | Carsten Dominik <carsten.dominik@gmail.com> | 2009-09-24 10:27:30 +0100 |
commit | 6867751efec5237866e9d1700d7b1f5766d9df63 (patch) | |
tree | 70ac8c924d409d9c4735f89f0182cdb96ca6053c | |
parent | c950e4b3acce6730cdf033f51d91eccd5a39c4f1 (diff) | |
download | org-mode-6867751efec5237866e9d1700d7b1f5766d9df63.tar.gz |
All indented lines starting with "#+" to be comments
-rw-r--r-- | doc/org.texi | 3 | ||||
-rwxr-xr-x | lisp/ChangeLog | 3 | ||||
-rw-r--r-- | lisp/org.el | 6 |
3 files changed, 10 insertions, 2 deletions
diff --git a/doc/org.texi b/doc/org.texi index fc4da81..9301c17 100644 --- a/doc/org.texi +++ b/doc/org.texi @@ -8471,7 +8471,8 @@ exported as a horizontal line (@samp{<hr/>} in HTML). @cindex #+BEGIN_COMMENT Lines starting with @samp{#} in column zero are treated as comments and will -never be exported. Also entire subtrees starting with the word +never be exported. If you want an indented line to be treated as a comment, +start it with @samp{#+ }. Also entire subtrees starting with the word @samp{COMMENT} will never be exported. Finally, regions surrounded by @samp{#+BEGIN_COMMENT} ... @samp{#+END_COMMENT} will not be exported. diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 063f471..530b844 100755 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,8 @@ 2009-09-24 Carsten Dominik <carsten.dominik@gmail.com> + * org.el (org-fontify-meta-lines-and-blocks): Treat lines with a + space after #+ as comments. + * org-latex.el (org-export-latex-emph-format): Use better commands to insert special characters in verbatim snippets. diff --git a/lisp/org.el b/lisp/org.el index db29253..078c3b7 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -4334,7 +4334,7 @@ will be prompted for." "Fontify #+ lines and blocks, in the correct ways." (let ((case-fold-search t)) (if (re-search-forward - "^\\([ \t]*#\\+\\(\\([a-zA-Z]+:?\\)\\(_\\([a-zA-Z]+\\)\\)?\\)\\(.*\\)\\)" + "^\\([ \t]*#\\+\\(\\([a-zA-Z]+:?\\| \\|$\\)\\(_\\([a-zA-Z]+\\)\\)?\\)\\(.*\\)\\)" limit t) (let ((beg (match-beginning 0)) (beg1 (line-beginning-position 2)) @@ -4384,6 +4384,10 @@ will be prompted for." beg (match-end 0) '(font-lock-fontified t face org-meta-line)) t) + ((member dc3 '(" " "")) + (add-text-properties + beg (match-end 0) + '(font-lock-fontified t face font-lock-comment-face))) (t nil)))))) (defun org-activate-angle-links (limit) |