[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [AUCTeX] Italicizing user macros

From: Arash Esbati
Subject: Re: [AUCTeX] Italicizing user macros
Date: Fri, 12 Aug 2016 21:58:30 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1

Hi Ognjen,

Ognjen Maric <address@hidden> writes:

> thanks for the responses. I missed them with Gmane being down. Anyway,
> font-latex-add-keywords did exactly what I wanted! I also prefer the
> file-local variant.
> Out of curiosity - I guess this is an Emacs question rather than an
> AUCTeX one, but I'll ask anyway - if I evaluate
> M-:
> (font-latex-add-keywords '(("inldef" "{" )) 'italic-command)
> I do get the syntax highlighting, but only for the previously unrendered
> parts of the document. Is there a way to force the re-fontification of
> the whole buffer?

Sorry for the late response.  I can't reproduce what you describe.  Can
you provide a recipe?

AUCTeX comes with a command TeX-normal-mode:

,----[ C-h k C-c C-n ]
| C-c C-n runs the command TeX-normal-mode (found in LaTeX-mode-map),
| which is an interactive compiled Lisp function in ‘tex.el’.
| It is bound to C-c C-n, C-c #, <menu-bar> <LaTeX> <Multifile/Parsing>
| <Reset Buffer>.
| (TeX-normal-mode &optional ARG)
| Remove all information about this buffer, and apply the style hooks again.
| Save buffer first including style information.
| With optional argument ARG, also reload the style hooks.

Put the specification above in a file local variable and try `C-c C-n'.

Emacs also has this:

| hack-local-variables is a compiled Lisp function in ‘files.el’.
| (hack-local-variables &optional MODE-ONLY)
| Parse and put into effect this buffer’s local variables spec.
| Uses ‘hack-local-variables-apply’ to apply the variables.
| If MODE-ONLY is non-nil, all we do is check whether a "mode:"
| is specified, and return the corresponding mode symbol, or nil.
| In this case, we try to ignore minor-modes, and only return a
| major-mode.
| If ‘enable-local-variables’ or ‘local-enable-local-variables’ is nil,
| this function does nothing.  If ‘inhibit-local-variables-regexps’
| applies to the file in question, the file is not scanned for
| local variables, but directory-local variables may still be applied.

Best, Arash

reply via email to

[Prev in Thread] Current Thread [Next in Thread]