# HG changeset patch # User Uwe Brauer # Date 1478528547 0 # Mon Nov 07 14:22:27 2016 +0000 # Node ID 0774fee450be9ea750589a6b11a1ef13dd46c631 # Parent e37527510e63bb0a4fcd64db2ab385a6f7fda5f2 Add new style: style/subfiles and add entry in Makefile.in. * Makefile.in (STYLESRC): Add subfiles.el * style/subfiles.el: Add new style file. diff --git a/Makefile.in b/Makefile.in --- a/Makefile.in +++ b/Makefile.in @@ -157,7 +157,7 @@ style/splitidx.el style/tikz.el style/xcolor.el \ style/pdflscape.el style/commath.el style/empheq.el \ style/framed.el style/paracol.el style/menukeys.el \ - style/bidi.el + style/bidi.el style/subfiles.el STYLEELC = $(STYLESRC:.el=.elc) diff --git a/style/subfiles.el b/style/subfiles.el new file mode 100644 --- /dev/null +++ b/style/subfiles.el @@ -0,0 +1,46 @@ +;;; subfiles.el --- AUCTeX style for the subfiles package. + +;; Copyright (C) 2016 Free Software Foundation, Inc. + +;; Author: Uwe Brauer +;; Created: 07 Nov 2016 +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for the subfiles package. + +;;; Code: + +(defvar LaTeX-subfiles-package-options nil + "Package options for the subfiles package.") + +(TeX-add-style-hook + "subfiles" + (lambda () + ;; thanks to Mosè + (TeX-run-style-hooks + (file-name-base (cadr (assoc "subfiles" LaTeX-provided-class-options)))) + (TeX-add-symbols + '("subfile" 0))) + LaTeX-dialect) + + +;;; subfiles.el ends here