Re: [AUCTeX] test if buffer is a standalone document

2015-05-12 Thread Mosè Giordano
Hi Tamas, 2015-05-12 10:43 GMT+02:00 Tamas Papp : > Hi, > > I have a setup where I automatically compile a tex file upon saving, but > only if it is a standalone document (eg not something included by > another file): > > (defun LaTeX-in-document-p () > (interactive) > (save-excursion > (g

[AUCTeX] test if buffer is a standalone document

2015-05-12 Thread Tamas Papp
Hi, I have a setup where I automatically compile a tex file upon saving, but only if it is a standalone document (eg not something included by another file): (defun LaTeX-in-document-p () (interactive) (save-excursion (goto-char (point-min)) (search-forward "documentclass" (point-max)