branch: elpa/drupal-mode
commit 6f2b2174fc4bbfdeaf0cead102578eaf79acb690
Author: Thomas Fini Hansen <[email protected]>
Commit: Thomas Fini Hansen <[email protected]>
Don't trigger drupal-mode in vendor dirs. Closes #57.
---
drupal-mode.el | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drupal-mode.el b/drupal-mode.el
index a5a6069bf7..26d17e1466 100644
--- a/drupal-mode.el
+++ b/drupal-mode.el
@@ -845,8 +845,10 @@ The function is suitable for adding to the supported major
modes
mode-hook."
(when (apply 'derived-mode-p (append drupal-php-modes drupal-css-modes
drupal-js-modes drupal-info-modes drupal-other-modes))
(drupal-detect-drupal-version)
- (when (or drupal-version
- (string-match "drush" (or buffer-file-name default-directory)))
+ (when (and
+ (or drupal-version
+ (string-match "drush" (or buffer-file-name default-directory)))
+ (not (string-match "vendor" (or buffer-file-name
default-directory))))
(drupal-mode 1))))
;;;###autoload