From: Kirill Kuvaldin <kuvkir@qwertyru.ru>
Subject: Re: keywords highlighting
Date: 8 Feb 2006 08:08:55 +0100 [thread overview]
Message-ID: <87irrqe3ab.fsf@utero.home> (raw)
In-Reply-To: mailman.175.1139356135.3144.help-gnu-emacs@gnu.org
Tim Johnson <tim@johnsons-web.com> writes:
> Kirill, I recommend that you do an appropos search on
> "font" "font-lock", etc. As in C-h, a, "font-lock".
>
> More advanced users can tell you what file extensions
> that emacs "knows about automatically", in my case:
> here is an example from my .emacs file:
Everythink ok with fontlocking, by keywords highlighting I didn't mean the
syntax highlighting. It's that emacs does by default.
I meant that keywords (FIXME, TODO) should be highlighted wherever they occur,
I'd like to use them in my code in comments representing the places in code
that need to be modified in future.
Just found such solution:
(setq keyword-highlight-modes
'(php-mode java-mode c-mode c++-mode emacs-lisp-mode scheme-mode))
(make-face 'font-lock-fixme-face)
(make-face 'font-lock-todo-face)
(mapc (lambda (mode)
(font-lock-add-keywords
mode
'(("\\<\\(FIXME\\)" 1 'font-lock-fixme-face t))))
keyword-highlight-modes)
(mapc (lambda (mode)
(font-lock-add-keywords
mode
'(("\\<\\(TODO\\)" 1 'font-lock-todo-face t))))
keyword-highlight-modes)
(modify-face 'font-lock-fixme-face "black" "yellow" nil t nil t nil nil)
(modify-face 'font-lock-todo-face "black" "yellow" nil t nil nil nil nil)
--
kuvkir
next prev parent reply other threads:[~2006-02-08 7:08 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-02-07 19:29 keywords highlighting Kirill Kuvaldin
2006-02-07 20:47 ` albrns
2006-02-07 23:56 ` Tim Johnson
[not found] ` <mailman.175.1139356135.3144.help-gnu-emacs@gnu.org>
2006-02-08 7:08 ` Kirill Kuvaldin [this message]
2006-02-08 17:18 ` Alan Mackenzie
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87irrqe3ab.fsf@utero.home \
--to=kuvkir@qwertyru.ru \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).