Home | History | Annotate | Download | only in emacs

Lines Matching defs:compile

1 ;;; android-compile.el --- Compile the Android source tree.
19 ;; Helper functions to compile Android file within emacs.
25 ;; The only interactive function is 'android-compile'.
26 ;; In your .emacs load this file (e.g (require 'android-compile)) then:
28 ;; (add-hook 'c++-mode-hook 'android-compile)
29 ;; (add-hook 'java-mode-hook 'android-compile)
31 ;; (global-set-key [f9] 'android-compile)
34 ;; TODO: Maybe we could cache the result of the compile function in
39 (require 'compile)
43 (defvar android-compile-ignore-re
86 ;; called when new data has been inserted in the compile buffer. Don't
90 ;; We store in a buffer local variable `android-compile-context' a
96 (defun android-compile-filter ()
100 called when new data has been inserted in the compile buffer.
109 ;; Check if android-compile-context does not exist or if the
112 (unless (and (local-variable-p 'android-compile-context)
113 (eq proc (cadr android-compile-context)))
114 (setq android-compile-context (list (point-min) proc))
115 (make-local-variable 'android-compile-context)))
117 (let ((beg (car android-compile-context))
129 (while (search-forward-regexp android-compile-ignore-re end t)
135 (setcar android-compile-context (point)))))
137 (defun android-compile ()
152 ;; Add-hook do not re-add if already present. The compile
154 (add-hook 'compilation-filter-hook 'android-compile-filter)
155 (set (make-local-variable 'compile-command)
162 (call-interactively 'compile)))))
164 (provide 'android-compile)
166 ;;; android-compile.el ends here