[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Auctex and highlight own command
From: |
Igor Sosa Mayor |
Subject: |
Auctex and highlight own command |
Date: |
Mon, 27 Jan 2014 21:17:04 +0100 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
Hi,
I want to do something relatively easy, but I'm not able to find the
right solution.
I have defined a very simple command to insert some comments I want to
see in the final pdf:
\newcommand*{\com}[1]{\textcolor{blue}{NOTA: #1}}
Now I want auctex to highlight the content of the com-command. In
internet there is some solutions, for instance this one:
http://stackoverflow.com/questions/11844936/emacs-auctex-custom-syntax-highlight
But even this example does not work for me (that is, if I use the same
command and the solutions there, I see no differences)...
I can imagine, I should do something like this:
(add-hook 'LaTeX-mode-hook
(lambda ()
(font-lock-add-keywords nil
'(("\\(\\\\com\\)\\s-*{" 1 font-lock-warning-face t)))
But, as I said, this has no effect...
many thanks in advance!
--
:: Igor Sosa Mayor :: joseleopoldo1792@gmail.com ::
:: GnuPG: 0x1C1E2890 :: http://www.gnupg.org/ ::
:: jabberid: rogorido :: ::
- Auctex and highlight own command,
Igor Sosa Mayor <=