"Fossies" - the Fresh Open Source Software Archive

Member "auctex-12.3/style/ifluatex.el" (18 Oct 2020, 2198 Bytes) of package /linux/misc/auctex-12.3.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Lisp source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file. See also the latest Fossies "Diffs" side-by-side code changes report for "ifluatex.el": 12.2_vs_12.3.

    1 ;;; ifluatex.el --- AUCTeX style for `ifluatex.sty' version 1.3.
    2 
    3 ;; Copyright (C) 2014, 2016, 2018, 2020 Free Software Foundation, Inc.
    4 
    5 ;; Author: Davide G. M. Salvetti <salve@debian.org>
    6 ;; Maintainer: auctex-devel@gnu.org
    7 ;; Created: 2014-11-15
    8 ;; Keywords: tex
    9 
   10 ;; This file is part of AUCTeX.
   11 
   12 ;; AUCTeX is free software; you can redistribute it and/or modify it
   13 ;; under the terms of the GNU General Public License as published by the
   14 ;; Free Software Foundation; either version 3, or (at your option) any
   15 ;; later version.
   16 
   17 ;; AUCTeX is distributed in the hope that it will be useful, but WITHOUT
   18 ;; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
   19 ;; FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
   20 ;; for more details.
   21 
   22 ;; You should have received a copy of the GNU General Public License
   23 ;; along with AUCTeX; see the file COPYING.  If not, see
   24 ;; <https://www.gnu.org/licenses/>.
   25 
   26 ;;; Commentary:
   27 
   28 ;; This file adds support for `ifluatex.sty' 1.3.
   29 
   30 ;;; Code:
   31 
   32 ;; Silence the compiler:
   33 (declare-function font-latex-add-keywords
   34           "font-latex"
   35           (keywords class))
   36 
   37 (defun LaTeX-ifluatex-set-exit-mark (_optional)
   38   "Discard OPTIONAL and set exit-mark to current point."
   39   (set-marker exit-mark (point)))
   40 
   41 (TeX-add-style-hook
   42     "ifluatex"
   43   (lambda ()
   44     (TeX-add-symbols
   45      '("ifluatex"
   46        (TeX-arg-literal "%\n")
   47        LaTeX-ifluatex-set-exit-mark
   48        (TeX-arg-literal "\n\\else%\n\\fi%"))
   49      '("luatexversion" 0)
   50      '("luatexrevision" 0))
   51     (TeX-declare-expert-macros
   52      "ifluatex"
   53      "ifluatex" "luatexversion" "luatexrevision")
   54 
   55     ;; This package is used to make it possible to compile a document with both
   56     ;; LuaTeX and base TeX engines.  By setting `TeX-check-engine-list' to nil
   57     ;; we ignore engine restrictions posed by other packages.
   58     (setq TeX-check-engine-list nil)
   59 
   60     (when (and (featurep 'font-latex)
   61            (eq TeX-install-font-lock 'font-latex-setup))
   62       (font-latex-add-keywords '(("luatexversion")
   63                  ("luatexrevision"))
   64                    'function)))
   65   LaTeX-dialect)
   66 
   67 (defvar LaTeX-ifluatex-package-options nil
   68   "Package options for the ifluatex package.")
   69 
   70 ;;; ifluatex.el ends here