diff options
| author | Arash Esbati <arash@gnu.org> | 2026-03-31 21:13:33 +0200 |
|---|---|---|
| committer | Arash Esbati <arash@gnu.org> | 2026-03-31 21:13:33 +0200 |
| commit | 4dc9c8cc1d3672479665923bd0ae807839d3a64c (patch) | |
| tree | bf5a006e3df7625cbed1aeb04bf20396516aeb3f | |
| parent | f0f80f5bfd678fbd58cfeb8e8db472e442b69522 (diff) | |
Improve matching of header end/trailer start in ConTeXtexternals/auctex
* context.el (ConTeXt-header-end): Add other macro names marking
the header end. Add regexp to match additional arguments.
(ConTeXt-trailer-start): Add other macro names marking the trailer
start. Issue reported by Jim Diamond <zlists+auctex@jdvb.ca>:
https://lists.gnu.org/archive/html/auctex/2026-03/msg00010.html
| -rw-r--r-- | context.el | 10 |
1 files changed, 7 insertions, 3 deletions
@@ -1,6 +1,6 @@ ;;; context.el --- Support for ConTeXt documents. -*- lexical-binding: t; -*- -;; Copyright (C) 2003-2025 Free Software Foundation, Inc. +;; Copyright (C) 2003-2026 Free Software Foundation, Inc. ;; Author: Patrick Gundlach <pg@levana.de> ;; Berend de Boer <berend@pobox.com> @@ -1257,14 +1257,18 @@ header is at the start of a line." (concat (regexp-quote TeX-esc) (ConTeXt-environment-start-name) - ConTeXt-text)) + (regexp-opt `( ,ConTeXt-text "component" "document" "MPpage" + "product" "TEXpage")) + ;; Allow one level of argument inside braces + "\\(?:[ \t]*\\(?:\\[[^][]*?\\(?:{[^}{]*}[^][]*\\)*\\]\\)?\\|.*$\\)")) (defun ConTeXt-trailer-start () "Default start of trailer marker for ConTeXt documents." (concat (regexp-quote TeX-esc) (ConTeXt-environment-stop-name) - ConTeXt-text)) + (regexp-opt `( ,ConTeXt-text "component" "document" "MPpage" + "product" "TEXpage")))) (defun ConTeXt-outline-offset () "Offset to add to `ConTeXt-section-list' levels to get outline level." |
