Function: context-guess-current-interface

context-guess-current-interface is an interactive and byte-compiled function defined in context.el.

Signature

(context-guess-current-interface)

Documentation

Guess what ConTeXt interface the current buffer is using.

Key Bindings

Source Code

;; Defined in ~/.emacs.d/elpa/auctex-14.1.2/context.el
(defun context-guess-current-interface ()
  "Guess what ConTeXt interface the current buffer is using."
  (interactive)
  (save-excursion
    (goto-char (point-min))
    (setq ConTeXt-current-interface
          (cond ((re-search-forward "%.*?interface=en" (+ 512 (point)) t)
                 "en")
                ((re-search-forward "%.*?interface=nl" (+ 512 (point)) t)
                 "nl")
                ((re-search-forward "\\\\starttext" (+ 1024 (point)) t)
                 "en")
                ((re-search-forward "\\\\starttekst" (+ 1024 (point)) t)
                 "nl")
                (t
                 ConTeXt-default-interface)))))