diff options
| author | 2024-12-30 11:25:48 -0800 | |
|---|---|---|
| committer | 2024-12-30 11:25:48 -0800 | |
| commit | ed273e59d23e837298088578417465e229056fec (patch) | |
| tree | 2e7b5929031d01e39d9b8de74651ea9807837088 | |
| parent | ac7beb27febab26e3a5f3d1cae070336f27e9e57 (diff) | |
| download | emacs-config-ed273e59d23e837298088578417465e229056fec.tar.gz emacs-config-ed273e59d23e837298088578417465e229056fec.zip | |
oni-php: Make sure the use script runs in the right directory
| -rw-r--r-- | oni-php/oni-php.el | 5 |
1 files changed, 3 insertions, 2 deletions
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 <tom@ryuslash.org> ;; 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)))) |
