diff --git a/oni-php/oni-php.el b/oni-php/oni-php.el index 941a6fe..2d10242 100644 --- a/oni-php/oni-php.el +++ b/oni-php/oni-php.el @@ -4,7 +4,7 @@ ;; Author: Tom Willemse ;; Keywords: local -;; Version: 2024.1230.091219 +;; Version: 2024.1230.094546 ;; Package-Requires: (php-mode oni-yasnippet oni-flycheck oni-company oni-hydra ggtags fic-mode company-php) ;; This program is free software; you can redistribute it and/or modify @@ -73,7 +73,8 @@ nil for some reason." (defun oni-php-add-use (class) "Try to add a use statement for CLASS under point." (interactive (list (symbol-name (symbol-at-point)))) - (let* ((classes (read (shell-command-to-string (concat (expand-file-name "find-php-class" oni-php-scripts-dir) " " class)))) + (let* ((default-directory (project-root (project-current))) + (classes (read (shell-command-to-string (concat (expand-file-name "find-php-class" oni-php-scripts-dir) " " class)))) (class (if (> (length classes) 1) (completing-read "Use: " classes nil t) (car classes))))