On Sep 25, 2009, at 11:10 AM, Eric S Fraga wrote:
At Thu, 24 Sep 2009 10:27:57 +0100, Carsten Dominik wrote:
On Sep 22, 2009, at 7:30 PM, René wrote:
Unfortunately, in this case Emacs doesn't fontify those lines as if
they were comments.
It does now.
- Carsten
Carsten, thanks for this. It works perfectly.
But this leads to me a more general question for all of you emacs
experts: comments in my org files typically consist of /less
important/ text and so I like to de-emphasise the text by changing the
face used (to a light gray, in my case, compared with the default of
firebrick). However, for programming, I prefer the default. Can
somebody suggest how I can have a different font-lock-comment-face for
org-mode files without making a global change? Should I put something
in the org-mode hook?
Or even on a per-file basis? I've tried using Emacs local variables
but haven't found the right incantation... :(
Any suggestions more than welcome!
Hi Eric,
I don't know how to change `font-lock-comment-face' on a per-buffer
level.
What you can do though (I think) is use the function `font-lock-add-
keywords'
to add your own regular expression for matching comments and specify
an arbitrary font for this match. For example (untested):
(font-lock-add-keywords 'org-mode
'(("^[ \t]*#.*" 0 my-org-comment-face prepend)))
- Carsten
_______________________________________________
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode