[Top][All Lists]

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

Re: [AUCTeX-devel] patch for subfiles

From: Tassilo Horn
Subject: Re: [AUCTeX-devel] patch for subfiles
Date: Mon, 07 Nov 2016 19:26:30 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux)

Uwe Brauer <address@hidden> writes:

Hi Uwe,

just some nitpicks as always. ;-)

> +(TeX-add-style-hook
> + "subfiles"
> + (lambda ()
> +   ;; thanks to Mosè

I think that comment is of no help here without context.  Feel free to
mention what Mosè suggested for which problem, and possibly add a link
to the thread in the archives.  Or just omit it and add an
Acknowledgements section to the header.

> +   (TeX-run-style-hooks
> +    (file-name-base (cadr (assoc "subfiles" LaTeX-provided-class-options))))
> +   (TeX-add-symbols
> +    '("subfile" 0)))

I just had a look at the subfiles docs, and it seems to me the macro is


The 0 in your spec means

,----[ (info "(auctex)Adding Macros") ]
| 'number'
|      Insert that many braces, leave point inside the first.  0 and -1
|      are special.  0 means that no braces are inserted.  -1 means that
|      braces are inserted around the macro and an active region (e.g.
|      '{\tiny foo}').  If there is no active region, no braces are
|      inserted.

which you probably don't want here.  Instead, use a spec

  '("subfile" TeX-arg-file)

which would query for a file name when inserting the \subfile macro
using C-c RET.


reply via email to

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