]> code.delx.au - gnu-emacs-elpa/blobdiff - packages/auctex/context.el
Get "make -k" to go through
[gnu-emacs-elpa] / packages / auctex / context.el
index 6dff15e593e077dd66b58c7333b2a19a28f1f391..f7042a69fb14aa1c23bc9de492f6f2d9431cd4ce 100644 (file)
@@ -1,7 +1,6 @@
 ;;; context.el --- Support for ConTeXt documents.
 
-;; Copyright (C) 2003, 2004, 2005, 2006, 2008, 2010 Free Software
-;;   Foundation, Inc.
+;; Copyright (C) 2003, 2004, 2005, 2006, 2008 Free Software Foundation, Inc.
 
 ;; Maintainer: Berend de Boer <berend@pobox.com>
 ;; Keywords: tex
@@ -52,8 +51,8 @@
 
 (require 'tex-buf)
 (require 'tex)
-(require 'latex) ; for functions like `TeX-look-at' and `LaTeX-split-long-menu'
-(require 'plain-tex) ; for `plain-TeX-common-initialization'
+;; need functions like TeX-look-at and LaTeX-split-long-menu
+(require 'latex)
 
 (defgroup ConTeXt-macro nil
   "Special support for ConTeXt macros in AUCTeX."
@@ -905,6 +904,10 @@ If OPTIONAL, only insert it if not empty, and then use square brackets."
 (defvar ConTeXt-item-list ()
   "List of macro's considered items.")
 
+(defvar ConTeXt-extra-paragraph-commands
+  '("crlf" "par")
+  "List of ConTeXt macros that should have their own line besides the section(-block) commands.")
+
 (defun ConTeXt-paragraph-commands-regexp ()
   "Return a regexp matching macros that should have their own line."
   (concat
@@ -1062,7 +1065,7 @@ An optional fourth (or sixth) element means always replace if t."
 (defvar ConTeXt-indent-arg 2)
 (defvar ConTeXt-indent-basic 2)
 (defvar ConTeXt-indent-item ConTeXt-indent-basic)
-(defvar ConTeXt-indent-item-re "\\\\\\(item\\|sym\\)\\>")
+(defvar ConTeXt-indent-item-re "\\\\\item\\>")
 
 (defvar ConTeXt-indent-syntax-table (make-syntax-table TeX-mode-syntax-table)
   "Syntax table used while computing indentation.")
@@ -1483,7 +1486,7 @@ else.  There might be text before point."
 (defun ConTeXt-expand-options ()
   "Expand options for texexec command."
   (concat
-   (let ((engine (eval (nth 4 (assq TeX-engine (TeX-engine-alist))))))
+   (let ((engine (nth 4 (assq TeX-engine (TeX-engine-alist)))))
      (when engine
        (format "--engine=%s " engine)))
    (unless (eq ConTeXt-current-interface "en")
@@ -1502,16 +1505,10 @@ else.  There might be text before point."
 ;; They are mapped to interface specific variables
 
 (defvar ConTeXt-language-variable-list
-  '(ConTeXt-define-list
-    ConTeXt-setup-list
-    ConTeXt-referencing-list
-    ConTeXt-other-macro-list
-    ConTeXt-project-structure-list
-    ConTeXt-section-block-list
-    ConTeXt-section-list
-    ConTeXt-text
-    ConTeXt-item-list
-    ConTeXt-extra-paragraph-commands))
+  '(ConTeXt-define-list ConTeXt-setup-list ConTeXt-referencing-list ConTeXt-other-macro-list
+          ConTeXt-project-structure-list
+          ConTeXt-section-block-list ConTeXt-section-list
+                      ConTeXt-text ConTeXt-item-list))
 
 (defcustom ConTeXt-clean-intermediate-suffixes
   ;; See *suffixes in texutil.pl.
@@ -1533,8 +1530,6 @@ i.e. you do _not_ have to cater for this yourself by adding \\\\' or $."
   :type '(repeat regexp)
   :group 'TeX-command)
 
-(TeX-abbrev-mode-setup context-mode)
-
 (defun ConTeXt-mode-common-initialization ()
   "Initialization code that is common for all ConTeXt interfaces."
   ;; `plain-TeX-common-initialization' kills all local variables, but
@@ -1546,8 +1541,6 @@ i.e. you do _not_ have to cater for this yourself by adding \\\\' or $."
     (setq ConTeXt-current-interface save-ConTeXt-current-interface))
   (setq major-mode 'context-mode)
 
-  (setq local-abbrev-table context-mode-abbrev-table)
-
   ;; Make language specific variables buffer local
   (dolist (symbol ConTeXt-language-variable-list)
     (make-variable-buffer-local symbol))
@@ -1557,8 +1550,6 @@ i.e. you do _not_ have to cater for this yourself by adding \\\\' or $."
     (set symbol (symbol-value (intern (concat (symbol-name symbol) "-"
                                              ConTeXt-current-interface)))))
 
-  ;; Create certain regular expressions based on language
-  (setq ConTeXt-indent-item-re (concat "\\\\\\(" (mapconcat 'identity ConTeXt-item-list "\\|") "\\)\\>"))
 
   ;; What's the deepest level at we can collapse a document?
   ;; set only if user has not set it. Need to be set before menu is created.