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

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

[elpa] externals/auctex af12165 16/36: Add new `ifluatex.el' style


From: Stefan Monnier
Subject: [elpa] externals/auctex af12165 16/36: Add new `ifluatex.el' style
Date: Fri, 28 Nov 2014 17:25:45 +0000

branch: externals/auctex
commit af12165c126b32532e7ea70654d7790da532e040
Author: Davide G. M. Salvetti <address@hidden>
Date:   Sat Nov 15 15:36:57 2014 +0100

    Add new `ifluatex.el' style
---
 ChangeLog         |    2 +
 style/ifluatex.el |   61 +++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 63 insertions(+), 0 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 8fbb2e5..f017e87 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,7 @@
 2014-11-15  Davide G. M. Salvetti  <address@hidden>
 
+        * style/ifluatex.el: New style.
+
         * doc/faq.texi: Update the `Why does 'TeX-next-error' ('C-c `')
         fail?' entry, taking into account the `TeX-file-line-error'
         option.  Update copyright range.
diff --git a/style/ifluatex.el b/style/ifluatex.el
new file mode 100644
index 0000000..48e1bd6
--- /dev/null
+++ b/style/ifluatex.el
@@ -0,0 +1,61 @@
+;;; ifluatex.el --- AUCTeX style for `ifluatex.sty' version 1.3.
+
+;; Copyright (C) 2014 Free Software Foundation, Inc.
+
+;; Author: Davide G. M. Salvetti <address@hidden>
+;; Maintainer: address@hidden
+;; Created: 2014-11-15
+;; 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, see
+;; <http://www.gnu.org/licenses/>.
+
+;;; Commentary:
+
+;; This file adds support for `ifluatex.sty' 1.3.
+
+;;; Code:
+
+(defun LaTeX-ifluatex-set-exit-mark (optional)
+  "Discard OPTIONAL and set exit-mark to current point."
+  (set-marker exit-mark (point)))
+
+(TeX-add-style-hook
+    "ifluatex"
+  (lambda ()
+    (TeX-add-symbols
+     '("ifluatex"
+       (TeX-arg-literal "%\n")
+       LaTeX-ifluatex-set-exit-mark
+       (TeX-arg-literal "\n\\else%\n\\fi%"))
+     '("luatexversion" 0)
+     '("luatexrevision" 0))
+
+    (TeX-declare-expert-macros
+     "ifluatex"
+     "ifluatex" "luatexversion" "luatexrevision")
+
+    (when (and (featurep 'font-latex)
+              (eq TeX-install-font-lock 'font-latex-setup))
+      (font-latex-add-keywords '(("luatexversion")
+                                ("luatexrevision"))
+                              'function)))
+  LaTeX-dialect)
+
+(defvar LaTeX-ifluatex-package-options nil
+  "Package options for the ifluatex package.")
+
+;;; ifluatex.el ends here



reply via email to

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