emacs-elpa-diffs
[Top][All Lists]
Advanced

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

[nongnu] elpa/drupal-mode accf63bac1 234/308: Made blacklist a configura


From: ELPA Syncer
Subject: [nongnu] elpa/drupal-mode accf63bac1 234/308: Made blacklist a configurable regexp.
Date: Tue, 25 Jan 2022 10:59:50 -0500 (EST)

branch: elpa/drupal-mode
commit accf63bac1d97b3c266d0485afaa93740e3fba0c
Author: Thomas Fini Hansen <xen@xen.dk>
Commit: Thomas Fini Hansen <xen@xen.dk>

    Made blacklist a configurable regexp.
---
 drupal-mode.el | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/drupal-mode.el b/drupal-mode.el
index 26d17e1466..132e3d7364 100644
--- a/drupal-mode.el
+++ b/drupal-mode.el
@@ -170,6 +170,12 @@ Include path to the executable if it is not in your $PATH."
   :type '(repeat symbol)
   :group 'drupal)
 
+;;;###autoload
+(defcustom drupal-ignore-paths-regexp "\\(vendor\\|node_modules\\)"
+  "Don't enable Drupal mode per default in files whose path match this regexp."
+  :type 'regexp
+  :group 'drupal)
+
 (defcustom drupal-enable-auto-fill-mode t
   "Whether to use `auto-fill-mode' in Drupal PHP buffers.
 Drupal mode will only do auto fill in comments (auto filling code
@@ -848,7 +854,7 @@ mode-hook."
     (when (and
            (or drupal-version
                (string-match "drush" (or buffer-file-name default-directory)))
-           (not (string-match "vendor" (or buffer-file-name 
default-directory))))
+           (not (string-match drupal-ignore-paths-regexp (or buffer-file-name 
default-directory))))
       (drupal-mode 1))))
 
 ;;;###autoload



reply via email to

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