all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Igor Sosa Mayor <joseleopoldo1792@gmail.com>
To: lista-emacs <help-gnu-emacs@gnu.org>
Subject: Auctex and highlight own command
Date: Mon, 27 Jan 2014 21:17:04 +0100	[thread overview]
Message-ID: <20140127201704.GA1911@pedroche.home> (raw)

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



             reply	other threads:[~2014-01-27 20:17 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-27 20:17 Igor Sosa Mayor [this message]
2014-01-28 10:12 ` Auctex and highlight own command Tassilo Horn
2014-01-28 10:32   ` Igor Sosa Mayor
2014-01-31 22:57     ` Tassilo Horn
     [not found] <mailman.12978.1390853889.10748.help-gnu-emacs@gnu.org>
2014-01-28  3:23 ` 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

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140127201704.GA1911@pedroche.home \
    --to=joseleopoldo1792@gmail.com \
    --cc=help-gnu-emacs@gnu.org \
    /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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.