branch: elpa/drupal-mode
commit 7ddadecabd1c052df0490c950aca522a275f1d7d
Author: Arne Jørgensen <[email protected]>
Commit: Arne Jørgensen <[email protected]>
Reduced number of times calling `drupal-detect-drupal-version`.
---
drupal-mode.el | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/drupal-mode.el b/drupal-mode.el
index 2c84391532..f89ec5392f 100644
--- a/drupal-mode.el
+++ b/drupal-mode.el
@@ -268,9 +268,6 @@ function arguments.")
:lighter " Drupal"
:keymap drupal-mode-map
- ;; Detect drupal version, drupal root, etc.
- (drupal-detect-drupal-version)
-
;; Delete trailing white space.
(when (eq drupal-delete-trailing-whitespace 'always)
(add-hook 'before-save-hook #'delete-trailing-whitespace nil t))
@@ -546,7 +543,7 @@ It is really slow to download `drupal-search-url'. You
should
probably not use this. Have a look at using GNU GLOBAL / Gtags
instead."
(unless version
- (setq version (drupal-detect-drupal-version)))
+ (setq version drupal-version))
(with-temp-buffer
(ignore-errors
(url-insert-file-contents (format-spec drupal-search-url `((?v .
,version)
@@ -740,7 +737,7 @@ Used in `drupal-insert-hook' and `drupal-insert-function'."
"Return major version number of version string.
If major version number is 4 - return both major and minor."
(unless version
- (setq version (drupal-detect-drupal-version)))
+ (setq version drupal-version))
(when version
(let ((version-list (split-string version "\\.")))
(if (= (string-to-number (car version-list)) 4)