emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 6e8fc4f6eab: Use python-mode for SCons build files


From: Stefan Kangas
Subject: master 6e8fc4f6eab: Use python-mode for SCons build files
Date: Fri, 4 Oct 2024 19:08:58 -0400 (EDT)

branch: master
commit 6e8fc4f6eabe21fc3e6df8c860a99e3e5f3748fd
Author: Stefan Kangas <stefankangas@gmail.com>
Commit: Stefan Kangas <stefankangas@gmail.com>

    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.
---
 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 7576bae9f95..173a9bc3692 100644
--- a/lisp/progmodes/python.el
+++ b/lisp/progmodes/python.el
@@ -295,10 +295,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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]