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

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

[nongnu] elpa/drupal-mode d3b4c6f1e7 112/308: Added variable for GNU GLO


From: ELPA Syncer
Subject: [nongnu] elpa/drupal-mode d3b4c6f1e7 112/308: Added variable for GNU GLOBAL`global' command.
Date: Tue, 25 Jan 2022 10:59:35 -0500 (EST)

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

    Added variable for GNU GLOBAL`global' command.
    
    Earlier versions of `gtags.el' didn't have a `gtags-global-command'
    variable. So we add our own.
    
    Fixes #31.
---
 drupal/gtags.el | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/drupal/gtags.el b/drupal/gtags.el
index 5c460f59cb..e2267ac54f 100644
--- a/drupal/gtags.el
+++ b/drupal/gtags.el
@@ -1,6 +1,6 @@
 ;;; drupal/gtags.el --- Drupal-mode support for gtags
 
-;; Copyright (C) 2012 Arne Jørgensen
+;; Copyright (C) 2012, 2013 Arne Jørgensen
 
 ;; Author: Arne Jørgensen <arne@arnested.dk>
 
@@ -28,6 +28,12 @@
 (require 'gtags)
 (require 'drupal/emacs-drush)
 
+(defvar drupal/gtags-global-command (if (boundp 'gtags-global-command)
+                                        gtags-global-command
+                                      (executable-find "global"))
+  "Name of the GNU GLOBAL `global' executable.
+Include path to the executable if it is not in your $PATH.")
+
 (defun drupal/gtags-enable ()
   "Setup rootdir for gtags to be DRUPAL_ROOT."
   (when (and (boundp 'drupal-rootdir)
@@ -47,7 +53,7 @@
              (file-exists-p (concat drupal-rootdir "GTAGS")))
     (with-temp-buffer
       (ignore-errors
-        (call-process gtags-global-command nil t nil "-x" symbol)
+        (call-process drupal/gtags-global-command nil t nil "-x" symbol)
         (goto-char (point-min))
         (search-forward-regexp "[^(]*(\\(.*\\))[^)]*" nil t)
         (match-string-no-properties 1)))))



reply via email to

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