Skip to content

Commit 6f2b217

Browse files
committed
Don't trigger drupal-mode in vendor dirs. Closes #57.
1 parent eb21f8a commit 6f2b217

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

drupal-mode.el

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -845,8 +845,10 @@ The function is suitable for adding to the supported major modes
845845
mode-hook."
846846
(when (apply 'derived-mode-p (append drupal-php-modes drupal-css-modes drupal-js-modes drupal-info-modes drupal-other-modes))
847847
(drupal-detect-drupal-version)
848-
(when (or drupal-version
849-
(string-match "drush" (or buffer-file-name default-directory)))
848+
(when (and
849+
(or drupal-version
850+
(string-match "drush" (or buffer-file-name default-directory)))
851+
(not (string-match "vendor" (or buffer-file-name default-directory))))
850852
(drupal-mode 1))))
851853

852854
;;;###autoload

0 commit comments

Comments
 (0)