Patch to jde-compile: jde-compile-enable-kill-buffer
"Jeff Peck" <[email protected]>
| Newsgroups | gmane.emacs.jdee.devel |
|---|---|
| Message-ID | <96F8AA1FB92C405BBCFBC893FFA4DF8E@blue> |
This little patch allows one to easily reduce (or increase, I suppose) the timing for jde-compile-kill-buffer. Changes the definition of jde-compile-enable-kill-buffer from :boolean to :number ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ jdee-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/jdee-devel
jde-compile.patch
(application/octet-stream, 1.9 KB)
Index: lisp/jde-compile.el =================================================================== --- lisp/jde-compile.el (revision 164) +++ lisp/jde-compile.el (working copy) @@ -157,12 +157,9 @@ :type 'boolean) (defun jde-compile-kill-buffer (buf) - (if jde-compile-enable-kill-buffer - (progn - (delete-windows-on buf) - (kill-buffer buf)))) + (delete-windows-on buf) + (kill-buffer buf)) - ;; Thanks to Jack Donohue <[email protected]>. (defun jde-compile-finish-kill-buffer (buf msg) "Removes the jde-compile window after a few seconds if no errors." @@ -171,11 +168,13 @@ (if (null (or (string-match ".*exited abnormally.*" msg) (string-match ".*BUILD FAILED.*" (buffer-string)))) ;;no errors, make the compilation window go away in a few seconds - (lexical-let ((compile-buffer buf)) - (run-at-time - "2 sec" nil 'jde-compile-kill-buffer - compile-buffer) - (message "No compilation errors")) + (if (not (minusp jde-compile-enable-kill-buffer)) + (lexical-let ((compile-buffer buf)) + (run-at-time + (format "%d sec" jde-compile-enable-kill-buffer) + nil 'jde-compile-kill-buffer + compile-buffer) + (message "No compilation errors"))) ;;there were errors, so jump to the first error (if jde-compile-jump-to-first-error (next-error 1))))) @@ -532,11 +531,13 @@ :group 'jde-compile-options :type 'boolean) -(defcustom jde-compile-enable-kill-buffer nil - "* If true the 'jde-compile-finish-kill-buffer will kill the compilation -buffer." +(defcustom jde-compile-enable-kill-buffer -1 + "* Time in seconds to display the compilation buffer before +'jde-compile-finish-kill-buffer will kill the compilation buffer. + +If less than zero, do not kill the compilation buffer." :group 'jde-compile-options - :type 'boolean) + :type 'number) (defun jde-compile-show-options-buffer () "Show the JDE Compile Options panel."