unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Auctex and highlight own command
@ 2014-01-27 20:17 Igor Sosa Mayor
  2014-01-28 10:12 ` Tassilo Horn
  0 siblings, 1 reply; 9+ messages in thread
From: Igor Sosa Mayor @ 2014-01-27 20:17 UTC (permalink / raw)
  To: lista-emacs

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  ::                            ::



^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2014-01-31 22:57 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <mailman.12978.1390853889.10748.help-gnu-emacs@gnu.org>
2014-01-28  3:23 ` Auctex and highlight own command Emanuel Berg
2014-01-28  7:34   ` Igor Sosa Mayor
2014-01-28  8:44   ` Igor Sosa Mayor
     [not found]   ` <mailman.13007.1390898732.10748.help-gnu-emacs@gnu.org>
2014-01-28 18:00     ` Emanuel Berg
2014-01-28 21:29       ` Igor Sosa Mayor
2014-01-27 20:17 Igor Sosa Mayor
2014-01-28 10:12 ` Tassilo Horn
2014-01-28 10:32   ` Igor Sosa Mayor
2014-01-31 22:57     ` Tassilo Horn

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).