diff options
| -rw-r--r-- | lisp/progmodes/project.el | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el index 06e882b9f06..41e34a37507 100644 --- a/lisp/progmodes/project.el +++ b/lisp/progmodes/project.el | |||
| @@ -681,5 +681,17 @@ loop using the command \\[fileloop-continue]." | |||
| 681 | from to (project-files (project-current t)) 'default) | 681 | from to (project-files (project-current t)) 'default) |
| 682 | (fileloop-continue)) | 682 | (fileloop-continue)) |
| 683 | 683 | ||
| 684 | ;;;###autoload | ||
| 685 | (defun project-compile () | ||
| 686 | "Run `compile' in the project root." | ||
| 687 | (interactive) | ||
| 688 | (let* ((pr (project-current t)) | ||
| 689 | (roots (project-roots pr)) | ||
| 690 | ;; TODO: be more intelligent when choosing a directory. This | ||
| 691 | ;; currently isn't a priority, since no `project-roots' | ||
| 692 | ;; implementation returns more that one directory. | ||
| 693 | (default-directory (car roots))) | ||
| 694 | (call-interactively 'compile))) | ||
| 695 | |||
| 684 | (provide 'project) | 696 | (provide 'project) |
| 685 | ;;; project.el ends here | 697 | ;;; project.el ends here |