From: Stefan Kangas Date: Fri, 4 Oct 2024 23:08:14 +0000 (+0200) Subject: Use python-mode for SCons build files X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=6dc975cd4056394a87c3aeecdbed7da1aca53704;p=emacs.git 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) --- 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