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

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

[nongnu] elpa/drupal-mode 2245c415ee 123/308: Added check for `drupal-dr


From: ELPA Syncer
Subject: [nongnu] elpa/drupal-mode 2245c415ee 123/308: Added check for `drupal-drush-program` is set.
Date: Tue, 25 Jan 2022 10:59:37 -0500 (EST)

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

    Added check for `drupal-drush-program` is set.
    
    Fixes #33.
---
 drupal/pcomplete.el | 21 +++++++++++----------
 1 file changed, 11 insertions(+), 10 deletions(-)

diff --git a/drupal/pcomplete.el b/drupal/pcomplete.el
index 164b2c5476..2d1f102539 100644
--- a/drupal/pcomplete.el
+++ b/drupal/pcomplete.el
@@ -29,16 +29,17 @@
 
 (defun drupal/pcomplete-drush-commands ()
   "Return the most common drush commands by parsing the drush output."
-  (with-temp-buffer
-    (call-process drupal-drush-program nil t nil
-                  "--early=includes/complete.inc")
-    (goto-char 0)
-    (let (commands)
-      (while (re-search-forward
-              "^[[:blank:]]*\\([@]?[[:word:]-.]+\\)"
-              nil t)
-        (push (match-string-no-properties 1) commands))
-      (sort commands #'string<))))
+  (when drupal-drush-program
+    (with-temp-buffer
+      (call-process drupal-drush-program nil t nil
+                    "--early=includes/complete.inc")
+      (goto-char 0)
+      (let (commands)
+        (while (re-search-forward
+                "^[[:blank:]]*\\([@]?[[:word:]-.]+\\)"
+                nil t)
+          (push (match-string-no-properties 1) commands))
+        (sort commands #'string<)))))
 
 (defvar drupal/pcomplete-drush-commands (drupal/pcomplete-drush-commands)
   "List of `drush' commands.")



reply via email to

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