From 6dc975cd4056394a87c3aeecdbed7da1aca53704 Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Sat, 5 Oct 2024 01:08:14 +0200 Subject: [PATCH] Use python-mode for SCons build files SCons is a build system whose associated files are Python scripts. Ref: https://www.scons.org/doc/0.96/HTML/scons-user/x325.html * lisp/progmodes/python.el (python--auto-mode-alist-regexp): Use 'python-mode' for SCons build files. (cherry picked from commit 6e8fc4f6eabe21fc3e6df8c860a99e3e5f3748fd) --- lisp/progmodes/python.el | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index ece90b9f18f..89950bfb340 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el @@ -278,10 +278,12 @@ ;;;###autoload (defconst python--auto-mode-alist-regexp - (rx "." (or "py" - "pth" ; Python Path Configuration File - "pyi" ; Python Stub File (PEP 484) - "pyw") ; MS-Windows specific extension + (rx (or + (seq "." (or "py" + "pth" ; Python Path Configuration File + "pyi" ; Python Stub File (PEP 484) + "pyw")) ; MS-Windows specific extension + (seq "/" (or "SConstruct" "SConscript"))) ; SCons Build Files eos)) ;;;###autoload -- 2.39.2