"Fossies" - the Fresh Open Source Software Archive

Member "auctex-12.3/style/ltxguide.el" (18 Oct 2020, 3314 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.

    1 ;;; ltxguide.el --- AUCTeX style for `ltxguide.cls' (2001/05/28)
    2 
    3 ;; Copyright (C) 2020 Free Software Foundation, Inc.
    4 
    5 ;; Author: Arash Esbati <arash@gnu.org>
    6 ;; Maintainer: auctex-devel@gnu.org
    7 ;; Created: 2020-01-05
    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
   14 ;; the Free Software Foundation; either version 3, or (at your option)
   15 ;; any later version.
   16 
   17 ;; AUCTeX is distributed in the hope that it will be useful, but
   18 ;; WITHOUT ANY WARRANTY; without even the implied warranty of
   19 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   20 ;; General Public License 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, write to the Free
   24 ;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
   25 ;; 02110-1301, USA.
   26 
   27 ;;; Commentary:
   28 
   29 ;; This file adds support for `ltxguide.cls' from 2001/05/28.
   30 ;; `ltxguide.cls' is part of TeXLive.
   31 
   32 ;;; Code:
   33 
   34 ;; Silence the compiler:
   35 (declare-function font-latex-add-keywords
   36           "font-latex"
   37           (keywords class))
   38 
   39 (defvar LaTeX-article-class-options)
   40 
   41 (defun LaTeX-item-ltxguide-decl ()
   42   "Insert line break macro on the previous line.
   43 For decl environment provided by ltxguide.cls."
   44   (save-excursion
   45     (end-of-line 0)
   46     (just-one-space)
   47     (TeX-insert-macro "\\")))
   48 
   49 (TeX-add-style-hook
   50  "ltxguide"
   51  (lambda ()
   52 
   53    ;; ltxguide.cls loads shortvrb.sty and sets | as a shorthand.
   54    ;; Append it to a local version of `LaTeX-shortvrb-chars' before
   55    ;; running the style hook for `shortvrb':
   56    (add-to-list (make-local-variable 'LaTeX-shortvrb-chars) ?| t)
   57 
   58    ;; Run style hooks for packages loaded by default:
   59    (TeX-run-style-hooks "shortvrb" "article")
   60 
   61    (TeX-add-symbols
   62     "clsguide"
   63     "usrguide"
   64     "fntguide"
   65     "cfgguide"
   66     "cyrguide"
   67     "modguide"
   68     "sourcecode"
   69     "LaTeXbook"
   70     "LaTeXcomp"
   71     "LaTeXGcomp"
   72     "LaTeXWcomp"
   73     "babel"
   74     "ctan"
   75     "eg"
   76     "ie"
   77     "SLiTeX"
   78     '("m" "Argument")
   79     '("arg" "Argument")
   80     '("oarg" "Argument")
   81     "NFSS"
   82     "AmSLaTeX"
   83     '("URL" "URL")
   84     '("NEWdescription" TeX-arg-date)
   85     '("NEWfeature" TeX-arg-date))
   86 
   87    (LaTeX-add-environments
   88     '("decl" LaTeX-env-args [ "Date" ]))
   89 
   90    ;; Enable `LaTeX-insert-item' in decl-environments:
   91    (add-to-list 'LaTeX-item-list
   92         '("decl" . LaTeX-item-ltxguide-decl)
   93         t)
   94 
   95    ;; Make the next 2 macros stay in their own line:
   96    (LaTeX-paragraph-commands-add-locally '("NEWdescription"
   97                        "NEWfeature"))
   98 
   99    ;; Verbatim-like macros with braces as delimiters:
  100    (add-to-list 'LaTeX-verbatim-macros-with-braces-local "URL")
  101 
  102    ;; Fontification
  103    (when (and (featurep 'font-latex)
  104           (eq TeX-install-font-lock 'font-latex-setup))
  105      (font-latex-add-keywords '(("m"              "{")
  106                 ("arg"            "{")
  107                 ("oarg"           "{")
  108                 ("NEWfeature"     "{")
  109                 ("NEWdescription" "{"))
  110                   'textual)
  111      (font-latex-add-keywords '(("URL" ""))
  112                   'reference)))
  113  LaTeX-dialect)
  114 
  115 (defvar LaTeX-ltxguide-class-options
  116   (progn
  117     (TeX-load-style "article")
  118     LaTeX-article-class-options)
  119   "Options for the ltxguide document class.")
  120 
  121 ;;; ltxguide.el ends here