diff options
author | szager <szager@chromium.org> | 2014-12-08 12:12:35 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-12-08 20:12:48 +0000 |
commit | 6ab0d8cca9c84354e3d5c9ad3996a122e376f72c (patch) | |
tree | 194c5439d0000efefd273596ff9e8633fc25bfee /tools/emacs | |
parent | 7f569a82a98ea87a0eea75133967274e5f4ec666 (diff) | |
download | chromium_src-6ab0d8cca9c84354e3d5c9ad3996a122e376f72c.zip chromium_src-6ab0d8cca9c84354e3d5c9ad3996a122e376f72c.tar.gz chromium_src-6ab0d8cca9c84354e3d5c9ad3996a122e376f72c.tar.bz2 |
Add cr-compile method for emacs.
This will cd to src/ before running the compile command. Works
best in conjunction with this added to c++-mode-hook:
set (make-local-variable 'compile-command) "ninja -C out/Debug"))
TBR=erg
BUG=none
Review URL: https://codereview.chromium.org/778273002
Cr-Commit-Position: refs/heads/master@{#307315}
Diffstat (limited to 'tools/emacs')
-rw-r--r-- | tools/emacs/flymake-chromium.el | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/emacs/flymake-chromium.el b/tools/emacs/flymake-chromium.el index 8adb0db..72fc560 100644 --- a/tools/emacs/flymake-chromium.el +++ b/tools/emacs/flymake-chromium.el @@ -112,6 +112,11 @@ (cancel-timer flymake-timer) (kill-local-variable 'flymake-allowed-file-name-masks)))) +(defun cr-compile () + (interactive) + (let ((default-directory (cr-flymake-chromium-src))) + (call-interactively 'compile))) + (add-hook 'find-file-hook 'cr-flymake-find-file 'append) (add-hook 'after-save-hook 'cr-flymake-kick-off-check-after-save) |