1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-21 03:52:16 -08:00

Add 'auto-mode-alist' entry for Containerfile

* lisp/progmodes/dockerfile-ts-mode.el: Also match Containerfile
and Containerfile.* in the 'auto-mode-alist' entry.  (Bug#79524)
This commit is contained in:
Augusto Stoffel 2025-09-27 15:32:05 +02:00 committed by Eli Zaretskii
parent 6a12fe3d79
commit b8555ebff4

View file

@ -218,7 +218,11 @@ is t or contains the mode name."
(when (treesit-available-p)
(add-to-list 'auto-mode-alist
;; NOTE: We can't use `rx' here, as it breaks bootstrap.
'("\\(?:Dockerfile\\(?:\\..*\\)?\\|\\.[Dd]ockerfile\\)\\'"
;; (rx (or (and (or "Dockerfile" "Containerfile")
;; (? "." (* nonl)))
;; (and "." (and (any "Dd") "ocker") "file"))
;; eos)
'("\\(?:\\(?:\\(?:Contain\\|Dock\\)erfile\\)\\(?:\\..*\\)?\\|\\.[Dd]ockerfile\\)\\'"
. dockerfile-ts-mode-maybe))
;; To be able to toggle between an external package and core ts-mode:
(defvar treesit-major-mode-remap-alist)