emacs-elpa-diffs
[Top][All Lists]
Advanced

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

[elpa] externals/auctex 8a14439 11/36: Add style file for subfiles packa


From: Tassilo Horn
Subject: [elpa] externals/auctex 8a14439 11/36: Add style file for subfiles package.
Date: Thu, 22 Dec 2016 13:08:11 +0000 (UTC)

branch: externals/auctex
commit 8a14439f4fbb0f8e5d30c689b339e32effbe0177
Author: Uwe Brauer <address@hidden>
Commit: Mosè Giordano <address@hidden>

    Add style file for subfiles package.
    
    * Makefile.in (STYLESRC): add subfiles.el entry
    
    * style/subfiles.el ("subfiles"): add new style.
    
    Signed-off-by: Mosè Giordano <address@hidden>
---
 Makefile.in       |    2 +-
 style/subfiles.el |   56 +++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 57 insertions(+), 1 deletion(-)

diff --git a/Makefile.in b/Makefile.in
index 6bb7e35..01adbac 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -158,7 +158,7 @@ STYLESRC = style/prosper.el \
           style/pdflscape.el style/commath.el   style/empheq.el \
           style/framed.el    style/paracol.el   style/menukeys.el \
           style/bidi.el      style/FiraMono.el  style/FiraSans.el \
-          style/bicaption.el style/amsfonts.el
+          style/bicaption.el style/amsfonts.el  style/subfiles.el
 
 STYLEELC = $(STYLESRC:.el=.elc)
 
diff --git a/style/subfiles.el b/style/subfiles.el
new file mode 100644
index 0000000..604e4f9
--- /dev/null
+++ b/style/subfiles.el
@@ -0,0 +1,56 @@
+;;; subfiles.el --- AUCTeX style for the subfiles package.
+
+;; Copyright (C) 2016 Free Software Foundation, Inc.
+
+;; Author: Uwe Brauer <address@hidden>
+;; 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.
+
+;; Acknowledgements
+;; Mosè Giordano  <address@hidden>
+;; Arash Esbati <address@hidden>
+
+;;; 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 ()
+   ;; The following code will fontify `\subfile{}' like  include.
+   (when (and (featurep 'font-latex)
+              (eq TeX-install-font-lock 'font-latex-setup))
+     (font-latex-add-keywords '(("subfile" "{"))
+                              'reference))
+   ;; The following code will run `TeX-run-style-hooks' on the subfile master 
file.
+   ;; Thanks to Mosè Giordano <address@hidden> for presenting a better 
solution using `assoc'.
+   (TeX-run-style-hooks
+    (file-name-base (cadr (assoc "subfiles" LaTeX-provided-class-options))))
+   (TeX-add-symbols
+    '("subfile" TeX-arg-file)))
+ LaTeX-dialect)
+
+
+;;; subfiles.el ends here



reply via email to

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