Function: ConTeXt-expand-options

ConTeXt-expand-options is a byte-compiled function defined in context.el.

Signature

(ConTeXt-expand-options)

Documentation

Expand options for context command.

Source Code

;; Defined in ~/.emacs.d/elpa/auctex-14.2.0/context.el
(defun ConTeXt-expand-options ()
  "Expand options for context command."
  (pcase ConTeXt-Mark-version
    ;; Mark IV or XL (LMTX)
    ((or "IV" "XL")
     (concat
      (if TeX-source-correlate-mode
          "--synctex=repeat ")
      ;; Omit nonstop option when we set synctex option.  According to
      ;; Jim <zlists+context@jdvb.ca> in bug#70399 report,
      ;; "if context is called with "--nonstopmode" (or "--nonstop")
      ;;  the "--synctex=..." request to create a synctex file is
      ;;  over-ridden."
      (unless (or TeX-interactive-mode TeX-source-correlate-mode)
        ConTeXt-texexec-option-nonstop)))
    ;; In any other case fall back on Mark II.
    (_ (concat
        (let ((engine (eval (nth 4 (TeX-engine-in-engine-alist TeX-engine)) t)))
          (when engine
            (format "--engine=%s " engine)))
        (unless (string= ConTeXt-current-interface "en")
          (format "--interface=%s " ConTeXt-current-interface))
        (when TeX-source-correlate-mode
          (format "--passon=\"%s\" "
                  (if (eq (TeX-source-correlate-method-active) 'synctex)
                      TeX-synctex-tex-flags
                    TeX-source-specials-tex-flags)))
        (unless TeX-interactive-mode
          ConTeXt-texexec-option-nonstop)))))