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

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

[nongnu] elpa/drupal-mode 8fc32e7641 053/308: Made `drupal-detect-drupal


From: ELPA Syncer
Subject: [nongnu] elpa/drupal-mode 8fc32e7641 053/308: Made `drupal-detect-drupal-version' more reliable.
Date: Tue, 25 Jan 2022 10:59:23 -0500 (EST)

branch: elpa/drupal-mode
commit 8fc32e7641eaabbf15173a029b13340e56ca9652
Author: Arne Jørgensen <arne@arnested.dk>
Commit: Arne Jørgensen <arne@arnested.dk>

    Made `drupal-detect-drupal-version' more reliable.
    
    But it should be rewritten from scratch to perform better and be less
    error prone.
---
 drupal-mode.el | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drupal-mode.el b/drupal-mode.el
index 8123ffba4c..6a02bc4fcd 100644
--- a/drupal-mode.el
+++ b/drupal-mode.el
@@ -349,7 +349,8 @@ If part of a Drupal project also detect the version of 
Drupal and
 the location of DRUPAL_ROOT."
   (interactive)
   (hack-local-variables)
-  (when (not drupal-version)
+  (when (or (not drupal-version)
+            (not drupal-rootdir))
     (dolist (file '("modules/system/system.module" "includes/bootstrap.inc" 
"core/includes/bootstrap.inc"))
       (let ((here (or buffer-file-name dired-directory)))
         (when here
@@ -363,7 +364,8 @@ the location of DRUPAL_ROOT."
                     (dir-locals-set-class-variables 'drupal-site `((nil . 
((drupal-version . ,(match-string-no-properties 2))
                                                                            
(drupal-rootdir . ,dir)))))
                     (dir-locals-set-directory-class dir 'drupal-site)))
-                (setq drupal-version (match-string-no-properties 2)))))))))
+                (setq drupal-version (match-string-no-properties 2))))))))
+    (hack-local-variables))
   (let ((module (drupal-locate-dominating-module buffer-file-name t))
         (version drupal-version))
     (when module



reply via email to

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