Skip to content

Commit

Permalink
Small fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
berndl committed Mar 18, 2003
1 parent b390043 commit 10e7368
Show file tree
Hide file tree
Showing 4 changed files with 104 additions and 23 deletions.
8 changes: 4 additions & 4 deletions ecb-autogen.el
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
;;
;; Automatically generate autoloads for ECB
;;
;; This code is completely copied from semantic-autogen.el, the autoload
;; generator of semantic.
;; This code is based onto semantic-autogen.el, the autoload generator of
;; semantic.
;;
;;; Code
;;
Expand All @@ -38,7 +38,7 @@
(require 'silentcomp))

;; Emacs knows only a variable noninteractive whereas XEmacs knows both,
;; funvtion and variable. Therefore we silence here the byte-compiler.
;; funtion and variable. Therefore we silence here the byte-compiler.
(silentcomp-defun noninteractive)

;;; Compatibility
Expand Down Expand Up @@ -121,7 +121,7 @@ does nothing."
)
(batch-update-autoloads))
;; XEmacs adds autom. the provide statement but for GNU Emacs we must do
;; this.
;; this:
(when (not ecb-running-xemacs)
(save-excursion
(set-buffer (find-file-noselect (expand-file-name ecb-autogen-file)))
Expand Down
2 changes: 2 additions & 0 deletions ecb-util.el
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@ means not to count the minibuffer even if it is active."
(shrink-window-if-larger-than-buffer . around)
(show-temp-buffer-in-current-frame . around)
(scroll-other-window . around)
(compile-internal . before)
(custom-save-all . around)
(winner-mode . around)
(winner-redo . around)
Expand All @@ -156,6 +157,7 @@ means not to count the minibuffer even if it is active."
(resize-temp-buffer-window . around)
(shrink-window-if-larger-than-buffer . around)
(scroll-other-window . around)
(compile-internal . before)
(custom-save-all . around)
(winner-mode . around)
(winner-redo . around)
Expand Down
4 changes: 3 additions & 1 deletion ecb.el
Original file line number Diff line number Diff line change
Expand Up @@ -2928,7 +2928,8 @@ buffers \(like plain text-buffers) are used for updating the method-buffers.
With FORCE-NIL-CACHE the method-buffer is updated with a nil cache too, i.e.
it is cleared."
(when (and ecb-minor-mode
(equal (selected-frame) ecb-frame)
(ecb-point-in-edit-window)
;; (equal (selected-frame) ecb-frame)
(get-buffer-window ecb-methods-buffer-name)
(buffer-file-name (current-buffer))
;; TODO: Klaus Berndl <klaus.berndl@sdm.de>:
Expand Down Expand Up @@ -4493,6 +4494,7 @@ That is remove the unsupported :help stuff."
(t "bc" speedbar-change-initial-expansion-list)
(t "e" ecb-eshell-goto-eshell)
(t "x" ecb-expand-methods-nodes)
(t "\\" ecb-toggle-compile-window)
(t "/" ecb-toggle-enlarged-compilation-window)
(t "." ecb-cycle-through-compilation-buffers)))

Expand Down
113 changes: 95 additions & 18 deletions ecb.texi
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,7 @@ Tips and tricks
* Using eshell:: Optimal using of eshell in ECB
* Grepping directories:: Grepping directories with ECB
* Working with JDEE:: Working best with ECB and JDEE
* Compile-window on demand:: Displaying the compile-window on demand
Entry points for elisp programmers
Expand Down Expand Up @@ -4594,14 +4595,15 @@ edit-window is first selected otherwise either an error is reported or
some other special reaction; see the documentation of the adviced
functions for this.

For @code{other-window} and @code{other-window-for-scrolling} this
makes no sense, therefore you can not enable this for both of them.
For @code{other-window}, @code{other-window-for-scrolling} and
@code{switch-to-buffer-other-window} this makes no sense, therefore
you can not enable this for them.

Per default this is enabled for @code{delete-window},
@code{delete-other-windows}, @code{switch-to-buffer} and
@code{switch-to-buffer-other-window}.
@code{delete-other-windows}, @code{switch-to-buffer}.
@end defopt


@defopt layout-name
Select a window layout of ECB. Value is any arbitary string. There are
four different types of layouts: left, right, top and left-right,
Expand Down Expand Up @@ -4634,31 +4636,29 @@ changed the ECB-screen-layout by any action you can always go back to
this layout with @code{ecb-redraw-layout}
@end defopt


@defopt layout-switch-to-compilation-window
Switch-to-buffer...-functions switch to @code{ecb-compile-window}. If
the buffer argument of @code{switch-to-buffer} or
@code{switch-to-buffer-other-window} is an compilation buffer as
defined with @code{ecb-compilation-buffer-p} we will select the
@code{ecb-compile-window} first. This is useful if you always want
your compilation buffers within the compilation window and now within
the edit window.
Switching buffer functions switch always in @code{ecb-compile-window}.

If the buffer argument of such functions (e.g.
@code{switch-to-buffer}) is a compilation buffer as defined with
@code{ecb-compilation-buffer-p} we will select the
@code{ecb-compile-window} and display there the buffer. This is useful
if you always want your compilation buffers within the compilation
window and not within the edit window.

Note the difference between
@code{ecb-layout-always-operate-in-edit-window} and this option: If a
switch-to-buffer...-function is contained in the former one, then we
buffer-switching function is contained in the former one, then we
always jump first into the edit-window regardless of the destination
buffer. If also contained in this option then ECB checks the
destination buffer and then selects the @code{ecb-compile-window} if
it is a compilation-buffer in the meaning of
@code{ecb-compilation-buffer-p}!

Per default this is only enabled for @code{switch-to-buffer}. We
provide the option for @code{switch-to-buffer-other-window} too but
the assumption is that when a user asks for a buffer in another window
it should always be presented in another window.
Currently this seemes only making sense for @code{switch-to-buffer}.
@end defopt


@defopt layout-window-sizes
Specifies the sizes of the ECB windows for each layout. The easiest
way (and also the strongly recommended way) to change this variable is
Expand Down Expand Up @@ -5488,6 +5488,7 @@ situations.
* Using eshell:: Optimal using of eshell in ECB
* Grepping directories:: Grepping directories with ECB
* Working with JDEE:: Working best with ECB and JDEE
* Compile-window on demand:: Displaying the compile-window on demand
@end menu

@node Changing faces, Small screens, Tips and tricks, Tips and tricks
Expand Down Expand Up @@ -5849,7 +5850,7 @@ way to exclude things like CVS- or RCS-directories from the find-call:
See the variable @code{igrep-find-prune-clause} of the library
@file{igrep.el}.

@node Working with JDEE, , Grepping directories, Tips and tricks
@node Working with JDEE, Compile-window on demand, Grepping directories, Tips and tricks
@section Working best with ECB and JDEE

ECB is completely language independent, i.e. it works with any
Expand All @@ -5872,6 +5873,43 @@ command ``Create Source'' which allows easy creating new java-sources
by calling the command @code{jde-gen-class-buffer}.
@end itemize

@node Compile-window on demand, , Working with JDEE, Tips and tricks
@section Displaying the compile-window on demand

If you like displaying all output of compile/grep/etc. in an extra
compile-window (@pxref{Temp- and compile-buffers}) but you dislike
wasting the space of this compile-window if you are just editing then
you can get a compile-window ``on demand''. Just do the following:

@enumerate
@item
Customize @code{ecb-compile-window-height} to not nil and save it for
future sessions. This gives you an extra compile-window at the
bottom.

@item
Add the following to your .emacs:

@example
(add-hook 'ecb-activate-hook
(lambda ()
(ecb-toggle-compile-window -1)))
@end example

This hides the extra compile-window direct after the start of ECB
because there is no need for a compile-window at this moment.

@end enumerate

This is all you have to do. Now if you run @code{compile} (or
@code{grep} or other compile-modes) then ECB autom. displays the
compile-window at the bottom an display the compile-output there.

If you have finished with using the compile-output (e.g. fixing
errors) then you can throw away the compile-window just by
@code{ecb-toggle-compile-window} - ECB will reactivate it autom.
before next compilation!

@node Elisp programming, Conflicts and bugs, Tips and tricks, Top
@chapter Entry points for elisp programmers

Expand Down Expand Up @@ -6934,6 +6972,38 @@ JDE-dialogs will not work correct!
This section describes all currently known bugs of ECB. The
maintainers of ECB try to fix these bugs as soon as possible.

@subsection Following the source-file link in a help-buffer

This bug only occurs if a compile-window is used and visible!

If you call functions like @code{describe-function} which displays a
help-buffer in the compile-window, then you will often get an output
like this in the compile-window:

@example
ecb-activate is an interactive compiled Lisp function in `ecb'.
(ecb-activate)
Activates the ECB...
@end example

The link to `ecb' is normally a clickable link, means if you click
with the middle-mouse button onto it the file is opened (in our
example @file{ecb.el} would be opened.

If you click onto it when the help-buffer is already the current
buffer (i.e. the compile-window is already selected before the click!)
then all is working fine (i.e. the file is opened in the edit-window),
but if you click onto the link without selecting the compile-window
before (i.e. the edit-window is the current selected window) then the
file is openend in the compile-window which is probably not what you
want. Not a big problem but annoying.

The only available workaround is, first selecting the compile-window
and then clicking onto the link!

Probably this bug can never be fixed.

@subsection Extra history-entries for JDEE source-buffers

ECB on occasions creates an extra edit buffer for entries in the
Expand Down Expand Up @@ -7237,6 +7307,13 @@ Can i add my own commands to the popup-menues of tree-buffers?
@tab @tab
Yes, see @ref{Using the mouse}.

@item @tab @tab

@item
Can ECB display the compile-window ``on demand''?
@tab @tab
Yes, see @ref{Tips and tricks}.

@end multitable


Expand Down

0 comments on commit 10e7368

Please sign in to comment.