auctex / tex-site.el

;;; tex-site.el - Site specific variables.  Don't edit.

;; Copyright (C) 1991, 2000, 2001 Kresten Krab Thorup
;; Copyright (C) 1993, 1994, 1997, 1999,
;;               2003, 2004 Free Software Foundation, Inc.

;; Author: Per Abrahamsen <abraham@dina.kvl.dk>
;; Maintainer: auc-tex@sunsite.dk
;; 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 2, 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., 59 Temple Place - Suite 330, Boston, MA
;; 02111-1307, USA.

;;; Commentary:

;; This file used to contain variables customized for the local site.
;; This way of customizing AUCTeX should no longer be used.  All
;; relevant variables can be customized by using
;; M-x customize-variable RET
;; on them.  Copying stuff into this file, as was recommended
;; previously, would interfere with the operation of customize.
;;
;; Basically, this file contains a bunch of autoloads and
;; automatically generated information.  AUCTeX is enabled by placing
;; (require 'tex-site)
;; into a user's .emacs file, or the administrator can insert it in
;; the site-start.el file for a site-wide default.
;;
;; The right place for this file is in the `site-lisp' directory.

;;; Code:

(if (< emacs-major-version 21)
  (error "AUCTeX requires Emacs 21 or later"))

(defvar no-doc
  "This function is part of AUCTeX, but has not yet been loaded.
Full documentation will be available after autoloading the function."
  "Documentation for autoload functions.")

(defcustom TeX-image-directory 
  (if (featurep 'xemacs)
      (file-name-as-directory
       (expand-file-name "images" (locate-data-directory "auctex")))
    (file-name-as-directory (concat TeX-lisp-directory "images")))
  "*Directory containing hand generated TeX information.
Must end with a directory separator.

These correspond to TeX macros shared by all users of a site."
  :group 'TeX-file
  :type 'directory)

;; org Jan 16, 2005 16:02
;; (defvar TeX-image-directory (expand-file-name
;; 			     "images"
;; 			     TeX-lisp-directory)
;;   "*The directory where the AUCTeX images are located.")
;;


;;<--- [HERE BEGINS A CHANGE] Sep  6, 2004 20:44: suggestion by SY
(defcustom TeX-auto-global (file-name-as-directory
			    (expand-file-name "auto"
					      (locate-data-directory "auctex")))
  "*Directory containing automatically generated information.
Must end with a directory separator.
 
For storing automatic extracted information about the TeX macros
shared by all users of a site."
  :group 'TeX-file
  :type 'directory)


;; SY
(defcustom TeX-macro-global nil 
  "*The path to your global system wide TeX macro files.

The directory names *must* end with a slash.  If have system
administration rights, you open tex-site.el via the find-library
command in order to set the variable.  Otherwise set it in the
normal way via the custom interface.

A typical value could be:

  '\(\"/usr/share/texmf/tex/\"
    \"/usr/share/texmf/bibtex/bst/\"\)

You can possibly find these TeX directories on a GNU/Linux system
with the command:

  kpsewhich --progname latex --expand-braces $TEXMFLOCAL

Or:

  kpsewhich --progname latex --expand-braces $TEXMFCNF

Note that you may not need to set `TeX-macro-global' to anything and
the default value of nil may be the correct setting for you.

If you don't have administration rights contact your system
administrator.  If you are on MS Windows, look for the documentation
of your tex system, such as MikTex."
  :group 'TeX-file
  :type '(repeat (directory :format "%v")))

;; Inform the user if `TeX-macro-global' isn't set and it is likely
;; that it needs to be.
(eval-after-load "tex"
  '(if (and (not TeX-macro-global)
	    (or (getenv "TEXMFCNF")
		(getenv "TEXMFLOCAL")))
       (progn
	 (message "`TeX-macro-global' may not be set correctly.")
	 (sit-for 3)
	 (message "See `C-h v TeX-macro-global' for further information.")
	 (sit-for 3))))


;;; Autoloads:

(add-to-list 'auto-mode-alist '("\\.dtx\\'" . doctex-mode))
(add-to-list 'auto-mode-alist '("\\.drv\\'" . latex-mode))

;; Uwe Brauer Jan 14, 2005: NOT sure about this one!
;;(add-to-list 'load-path TeX-lisp-directory)

;; This hook will store bibitems when you save a BibTeX buffer.
(add-hook 'bibtex-mode-hook 'BibTeX-auto-store)
(autoload 'BibTeX-auto-store "latex" no-doc t)

(autoload 'tex-mode "tex" no-doc t)
(autoload 'plain-tex-mode "tex" no-doc t)
(autoload 'ams-tex-mode "tex" no-doc t)
(autoload 'context-mode "context" no-doc t)
(autoload 'doctex-mode "latex" no-doc t)
(autoload 'TeX-auto-generate "tex" no-doc t)
(autoload 'TeX-auto-generate-global "tex" no-doc t)
(autoload 'TeX-insert-quote "tex" no-doc t)
(autoload 'TeX-submit-bug-report "tex" no-doc t)
(autoload 'japanese-plain-tex-mode "tex-jp" no-doc t)
(autoload 'japanese-latex-mode "tex-jp" no-doc t)
(autoload 'texinfo-mode "tex-info" no-doc t)
(autoload 'latex-mode "latex" no-doc t)

(autoload 'LaTeX-install-toolbar "tex-bar")

(provide 'tex-site)

;;; tex-site.el ends here
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.