Uwe Brauer <o...@mat.ucm.es> writes: > > Reading your use-case, I suggest you make a LaTeX package with your > > definitions and \usepackage{<name>} that in your .tex file. Then write > > some proper AUCTeX style for that package. Not tested, it could look > > like this: > > > (defun ub/LaTeX-item-enumerate () > > (TeX-insert-macro "item") > > (save-excursion > > (LaTeX-label environment 'environment))) > > > (TeX-add-style-hook > > "<name>" > > (lambda () > > (TeX-run-style-hooks "enumitem") > > (add-to-list 'LaTeX-label-alist > > '("enumerate" . "item:") > > t) > > (add-to-list 'LaTeX-item-list > > '("enumerate" . ub/LaTeX-item-enumerate) > > t))) > > Thanks but this did not work, > > 1. Put it in my auctex init file and it returned error, when byte > compiling it (attached).
This was expected, hence I wrote: "Then write some proper AUCTeX style for that package." You can put the above code in a file called "pfsimple.el", change "<name>" to "pfsimple", customize `TeX-style-private' to a directory of your choice and save "pfsimple.el" there. Next time you \usepackage{pfsimple} in your .tex file, AUCTeX will load the style (with `TeX-parse-self' set to t). In general, I don't recommend to set this type of stuff in any sort of init file. Best, Arash _______________________________________________ auctex-devel mailing list auctex-devel@gnu.org https://lists.gnu.org/mailman/listinfo/auctex-devel