From ea700cbf750a98327f525e0a5a4934efdf2c9885 Mon Sep 17 00:00:00 2001 From: franck cuny Date: Sat, 16 Feb 2019 18:09:34 -0800 Subject: Add a mode for setting the indentation. For BUILD file, the indentation is set to 4. --- pants.el | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pants.el b/pants.el index 1809966..4deabe4 100644 --- a/pants.el +++ b/pants.el @@ -64,6 +64,13 @@ (defvar *pants-compilation-buffer* "*pants-compilation-buffer*") +(define-derived-mode pants-build-mode python-mode "Pants" + "Major mode for editing Pants build files." + :group 'pants + + (setq-local python-indent-guess-indent-offset nil) + (setq-local python-indent-offset 4)) + (defun pants--find-directory-containing-build-file (file) "Finds the directory containing the build file next to a give file." (let ((root nil) -- cgit v1.2.3