]> git.eshelyaron.com Git - emacs.git/commitdiff
Use python-mode for SCons build files
authorStefan Kangas <stefankangas@gmail.com>
Fri, 4 Oct 2024 23:08:14 +0000 (01:08 +0200)
committerEshel Yaron <me@eshelyaron.com>
Sun, 6 Oct 2024 06:49:18 +0000 (08:49 +0200)
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

index ece90b9f18fb0898dfb924cfc7e366ff2f81c3f7..89950bfb3402cd3345ab1afebdecae301323b8c6 100644 (file)
 
 ;;;###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