Commits

Anonymous committed 4bece03

Sync with current upstream 2.11 - see NEWS for details.

Comments (0)

Files changed (21)

+2003-11-18  Klaus Berndl  <klaus.berndl@sdm.de>
+
+	* Sync with current upstream 2.11, see NEWS for details.
+
 2003-10-31  Norbert Koch  <viteno@xemacs.org>
 
 	* Makefile (VERSION): XEmacs package 1.13 released.
 # Boston, MA 02111-1307, USA.
 
 VERSION = 1.13
-AUTHOR_VERSION = 1.96
+AUTHOR_VERSION = 2.11
 MAINTAINER = Klaus Berndl <klaus.berndl@sdm.de>
 PACKAGE = ecb
 PKG_TYPE = regular
 	ecb-util.elc tree-buffer.elc ecb-buffertab.elc ecb-speedbar.elc \
 	ecb-upgrade.elc ecb-layout-defs.elc ecb-tod.elc silentcomp.elc \
 	ecb-create-layout.elc ecb-examples.elc ecb-autogen.elc ecb-jde.elc \
-	ecb-winman-support.elc
+	ecb-winman-support.elc ecb-file-browser.elc ecb-method-browser.elc \
+	ecb-semantic-wrapper.elc
 
 
 EXTRA_SOURCES = NEWS README RELEASE_NOTES
 #DATA_1_FILES = $(HTML_FILES)
 #DATA_1_DEST = $(PACKAGE)/html
 
+DATA_1_FILES = $(wildcard ecb-images/default/height-15/*.xpm)
+DATA_1_DEST = $(PACKAGE)/ecb-images/default/height-15
+DATA_2_FILES = $(wildcard ecb-images/default/height-16/*.xpm)
+DATA_2_DEST = $(PACKAGE)/ecb-images/default/height-16
+DATA_3_FILES = $(wildcard ecb-images/default/height-17/*.xpm)
+DATA_3_DEST = $(PACKAGE)/ecb-images/default/height-17
+DATA_4_FILES = $(wildcard ecb-images/default/height-18/*.xpm)
+DATA_4_DEST = $(PACKAGE)/ecb-images/default/height-18
+DATA_5_FILES = $(wildcard ecb-images/default/height-19/*.xpm)
+DATA_5_DEST = $(PACKAGE)/ecb-images/default/height-19
+DATA_6_FILES = $(wildcard ecb-images/default/height-20/*.xpm)
+DATA_6_DEST = $(PACKAGE)/ecb-images/default/height-20
+DATA_7_FILES = $(wildcard ecb-images/default/height-21/*.xpm)
+DATA_7_DEST = $(PACKAGE)/ecb-images/default/height-21
+
+DATA_8_FILES = $(wildcard ecb-images/directories/height-15/*.xpm)
+DATA_8_DEST = $(PACKAGE)/ecb-images/directories/height-15
+DATA_9_FILES = $(wildcard ecb-images/directories/height-16/*.xpm)
+DATA_9_DEST = $(PACKAGE)/ecb-images/directories/height-16
+DATA_10_FILES = $(wildcard ecb-images/directories/height-17/*.xpm)
+DATA_10_DEST = $(PACKAGE)/ecb-images/directories/height-17
+DATA_11_FILES = $(wildcard ecb-images/directories/height-18/*.xpm)
+DATA_11_DEST = $(PACKAGE)/ecb-images/directories/height-18
+DATA_12_FILES = $(wildcard ecb-images/directories/height-19/*.xpm)
+DATA_12_DEST = $(PACKAGE)/ecb-images/directories/height-19
+DATA_13_FILES = $(wildcard ecb-images/directories/height-20/*.xpm)
+DATA_13_DEST = $(PACKAGE)/ecb-images/directories/height-20
+DATA_14_FILES = $(wildcard ecb-images/directories/height-21/*.xpm)
+DATA_14_DEST = $(PACKAGE)/ecb-images/directories/height-21
+
+
 PRELOADS = -l overlay -l compile -l timer -l ecb-util -l ecb-eshell \
 	-l ecb-layout -l tree-buffer -l esh-mode -l em-dirs -l jde-help \
 	-l semantic -l semantic-load -l semanticdb -l sendmail \
 # Define here the correct path to your Emacs or XEmacs binary
 EMACS=emacs
 
+# -------- Compiling ECB with the cedet-library 1.0 ----------------------
+
+# cedet 1.0 (contains a.o. semantic 2.0, eieio 0.18 and speedbar 0.15). If
+# you want compile ECB with the cedet library then set here the full path
+# to the cedet-installation directory.
+
+#CEDET=
+CEDET=C:/Programme/emacs-21/site-lisp/multi-file-packages/cedet-1.0beta1c
+
+# -------- Compiling ECB with the semantic < 2.0 -------------------------
+
+# If you want not compile ECB with the cedet1.0-library then do not set
+# CEDET above!
+
 # If semantic, eieio and speedbar are added to load-path within some
 # Elisp-statements in the Emacs initialization-files (e.g. .emacs or
 # site-start.el) then set here again the load-path of the semantic-version,
 #
 #      or
 #
+#      make CEDET="path/to/cedet"           #(for compiling with cedet 1.0)
+#
+#      or
+#
 #      make SEMANTIC="path/to/semantic" EIEIO="path/to/eieio" \
 #           SPEEDBAR="path/to/speedbar "EMACS="path/to/emacs"
 #
 
 # For the ECB-maintainers: Change the version-number here and not
 # elsewhere!
-ecb_VERSION=1.96
+ecb_VERSION=2.11
 
 
 RM=rm -f
             ecb-eshell.el ecb-cycle.el ecb-face.el ecb-compilation.el \
             ecb-upgrade.el ecb-create-layout.el silentcomp.el \
             ecb-speedbar.el ecb-examples.el ecb-tod.el ecb-autogen.el \
-	    ecb-jde.el ecb-winman-support.el
+	    ecb-jde.el ecb-file-browser.el ecb-method-browser.el \
+	    ecb-winman-support.el ecb-semantic-wrapper.el
 
 ecb_LISP_ELC=$(ecb_LISP_EL:.el=.elc)
 
 ecb_PS=$(ecb_TEXI:.texi=.ps)
 ecb_PDF=$(ecb_TEXI:.texi=.pdf)
 
+ecb_IMAGE_DIR=ecb-images
+
 ecb_DISTRIB_FILES=$(ecb_LISP_EL) $(ecb_AUTOLOADS) $(ecb_TEXI) $(ecb_ETC)
 
 ecb: $(ecb_LISP_EL)
 	@echo "Byte-compiling ECB with LOADPATH=${LOADPATH} ..."
 	@$(RM) $(ecb_LISP_ELC) ecb-compile-script
 	@echo "(add-to-list 'load-path nil)" > ecb-compile-script
-	@if test ! -z "${SEMANTIC}"; then\
-	   echo "(add-to-list 'load-path \"$(SEMANTIC)\")" >> ecb-compile-script; \
-	fi
-	@if test ! -z "${EIEIO}"; then\
-	   echo "(add-to-list 'load-path \"$(EIEIO)\")" >> ecb-compile-script; \
-	fi
-	@if test ! -z "${SPEEDBAR}"; then\
-	   echo "(add-to-list 'load-path \"$(SPEEDBAR)\")" >> ecb-compile-script; \
+	@if test ! -z "${CEDET}"; then\
+	   echo "(load-file \"$(CEDET)/common/cedet.el\")" >> ecb-compile-script; \
+	else \
+	   if test ! -z "${SEMANTIC}"; then\
+	      echo "(add-to-list 'load-path \"$(SEMANTIC)\")" >> ecb-compile-script; \
+	   fi; \
+	   if test ! -z "${EIEIO}"; then\
+	      echo "(add-to-list 'load-path \"$(EIEIO)\")" >> ecb-compile-script; \
+	   fi; \
+	   if test ! -z "${SPEEDBAR}"; then\
+	      echo "(add-to-list 'load-path \"$(SPEEDBAR)\")" >> ecb-compile-script; \
+	   fi; \
 	fi
 	@if test ! -z "${LOADPATH}"; then\
 	   for loadpath in ${LOADPATH}; do \
 	$(EBATCH) -l ecb-compile-script --eval '(ecb-byte-compile t)'
 	@$(RM) ecb-compile-script
 
+
 all: ecb online-help
 
 online-help: $(ecb_TEXI)
 	@$(MV) NEWS NEWS.tmp
 	@sed "1s/version.*/version $(ecb_VERSION)/" NEWS.tmp > NEWS
 	@$(RM) NEWS.tmp
-	@$(MV) ecb.el ecb.el.tmp
-	@sed "s/^(defconst ecb-version.*/(defconst ecb-version \"$(ecb_VERSION)\"/" ecb.el.tmp > ecb.el
-	@$(RM) ecb.el.tmp
+	@$(MV) ecb-upgrade.el ecb-upgrade.el.tmp
+	@sed "s/^(defconst ecb-version.*/(defconst ecb-version \"$(ecb_VERSION)\"/" ecb-upgrade.el.tmp > ecb-upgrade.el
+	@$(RM) ecb-upgrade.el.tmp
 	@(echo "/@macro ecbver";		\
 	  echo "+";				\
 	  echo "c";				\
 	@$(CP) $(ecb_DISTRIB_FILES) ecb-$(ecb_VERSION)
 	@$(CP) -r $(ecb_INFO_DIR) ecb-$(ecb_VERSION)
 	@$(CP) -r $(ecb_HTML_DIR) ecb-$(ecb_VERSION)
+	@$(CP) -r $(ecb_IMAGE_DIR) ecb-$(ecb_VERSION)
+	@find ecb-$(ecb_VERSION)/$(ecb_IMAGE_DIR) -name CVS -print | xargs rm -Rf
+	@find ecb-$(ecb_VERSION)/$(ecb_IMAGE_DIR) -name *~ -print | xargs $(RM)
 	@tar -cvzf ecb-$(ecb_VERSION).tar.gz ecb-$(ecb_VERSION)
 	@$(RM) -R ecb-$(ecb_VERSION)
 
+* Changes for ECB version 2.11
+
+** Using semanticdb to jump to type-tags defined in other files.
+   In OO-languages like CLOS, eieio and C++ there can be type-tags in the
+   method-buffer which are somehow virtual because there is no definition in
+   the current source-file. But such a virtual type collects all its outside
+   defined members like methods in C++ which are defined in the *.cc file
+   whereas the class-definition is defined in the associated header-file.
+   ECB uses semanticb to open the definition-file of such a tag and to jump to
+   the definition of this tag. Same for parent-tags in the methods-buffer.
+   This feature can only work correctly if semanticdb is well configured!
+
+** New option `ecb-ignore-special-display'
+   The options `special-display-buffer-names', `special-display-regexps' and
+   `special-display-function' work as expected. Per default this in only true,
+   when no durable compile-window is used (see option
+   `ecb-compile-window-height'), i.e. with a durable compile window the
+   special-display-options are ignored per default. But this behavior can be
+   changed with the new option `ecb-ignore-special-display'.
+
+   Thanks to Rob Walker <rob.lists@tenfoot.org.uk> for a first suggestion.
+
+** Better reporting if there are errors during ECB-startup
+
+** Fixed bugs
+
+*** Clicking onto nodes with positionless semantic-tags as data doesn't fail
+
+*** Non-semantic sources (e.g. Perl, TeX) work when cedet 1.0 is loaded
+
+*** Fixed the versioning of ECB so the autom. upgrade works
+
+
+
+* Changes for ECB version 2.01
+
+** Prepared for the new semantic 2.0 beta (contained in the cedet 1 beta)
+
+*** New naming convention
+
+    Forthcoming semantic 2.0 (part of the new cedet-library) introduces a new
+    naming convention. Here is the relevant part of the semantic 2.0
+    NEWS-file:
+    
+    token     - Refers to a lexical analyzer production.
+    stream    - A list of tokens
+    tag       - Refers to a datastructure created by a grammar to represent
+                something in a language file
+    table     - A hierarchical list of tags.
+    tag-class - A tag may represent a function, data type, or variable.
+    parse     - Run a source file through a parser.
+    
+    Normally there is no need for ECB users to bother with all details of
+    semantic naming conventions but for the sake of consisteny between
+    semantic and ECB the ECB-package has renamed all its variables and
+    functions from "token" to "tag". Therefore also all options which contain
+    "token" in their name have been renamed by replacing "token" with "tag".
+    See RELEASE_NOTES for a list of this options.
+ 
+    ECB autom. upgrades all old-values of these options to the new options!
+    There is nothing to do for you.
+
+*** ECB works with new semantic 2.0 which is shipped within cedet 1.0
+
+** Overhaul of the display-layer and -handling of the tree-buffers
+
+*** Now there are 3 different styles available
+    * Image: Looks very nice and modern - just give it a try or see the
+      screenshots-section at http://ecb.sourceforge.net
+    * Ascii with guide-lines: Drawing the trees with ascii-symbols
+    * Ascii without guide-lines: This is the style of ECB <= 1.96
+
+    For details and a visualization of these different styles see the new
+    option `ecb-tree-buffer-style' (replaces the old option
+    `ecb-tree-use-image-icons').
+
+    Especially the new image-style was inspired by the library tree-widget.el
+    written by David Ponce <david@dponce.com>. Also some images shipped with
+    ECB are "stolen" from this library.
+
+*** No-leaf-tree-nodes with currently no subnodes are displayed with [x]
+    An example are directories in the Directories tree-buffer which have
+    currently no subdirectories. Leafs like source-files or methods are of
+    course handled as leafs and not as currently empty nodes.
+
+*** Fixed some inconsistencies in expanding, collapsing and selecting nodes
+
+*** Moving all options related to the tree-buffer-style or -handling to the new
+    customize-group "ecb-tree-buffer".
+
+** Completely rewritten popup-menu mechanism.
+
+*** Now sub-menus are allowed for all popups
+    To give a better lucidity of the popup-menus of the tree-buffers these
+    menus can now being arranged in sub-menus. The default values now already
+    use sub-menus. So if you have added menu-entries to one of the options
+    `ecb-directories-menu-user-extension', `ecb-sources-menu-user-extension',
+    `ecb-methods-menu-user-extension' or `ecb-history-menu-user-extension' ECB
+    resets these options to the new defaults of ECB and adds at the top your
+    "old" personal entries. This comes because the type of these options has
+    changed. Thanks for general suggestion to Ole Arndt <ole@sugarshark.com>.
+
+*** Added new defaults to `ecb-directories-menu-user-extension'
+    Three new entries "CVS status", "CVS examine" and "CVS update" in a new
+    sub-menu "Version control" for running CVS-commands against the directory.
+    These menu-entries are added as new default values to
+    `ecb-directories-menu-user-extension' so a user can delete or change them
+    if he does not use CVS but another revision-tool (e.g. Clearcase). Thanks
+    for suggestion and first implementation to Ole Arndt <ole@sugarshark.com>.
+
+*** Added new defaults to `ecb-sources-menu-user-extension'
+    One new sub-menu "Version control" with some senseful commands. See also
+    new default for the option `ecb-directories-menu-user-extension'. Same is
+    added to the `ecb-history-menu-user-extension'. Thanks for suggestion and
+    first implementation to Ole Arndt <ole@sugarshark.com>.
+
+** Possibility to define which types should be expanded at file-open-time
+   Semantic groups types into different type-specifiers. Current available
+   type-specifiers are for example "class", "interface", "struct", "typedef",
+   "union" and "enum". With the new option `ecb-type-tag-expansion' you can
+   specify on a major-mode-basis which type-specifiers should be expanded at
+   file-open-time and which not. So for example in C++ it could be senseful
+   not to expand the types with a type-specifiers "typedef", "struct" or
+   "enum" (see the default-value of this option).
+    
+** Adding a filter-feature to the Sources- and the History-buffer
+   Now a filter can be applied to the Sources- and/or History-buffer which
+   desides which entries are displayed in these buffers. See the new commands
+   `ecb-sources-filter' (bound to [C-c . fs]) and `ecb-history-filter' (bound
+   to [C-c . fh]) and the new entries for the popup-menus for these buffers.
+   In the sources-buffer each directory has its own filter. The currently
+   applied filter is displayed in the modeline of that tree-buffer with the
+   new face `ecb-mode-line-prefix-face' (s.b.)
+
+** Changes related to the modelines of the tree-buffers
+   
+*** Added faces to the mode-lines of the ECB-tree-buffers.
+    See the three new options `ecb-mode-line-win-nr-face',
+    `ecb-mode-line-prefix-face' and `ecb-mode-line-data-face' and also they
+    related (and equally named) new faces.
+
+*** Moved all options related to the modelines in the new customize-group
+    "ecb-mode-line".
+       
+** No window-restrictions if the ECB-windows are hidden
+   If the special ECB-windows are hidden (e.g. by `ecb-toggle-ecb-windows')
+   then there are no restrictions about the window-layout of the ecb-frame:
+   The frame can be splitted in any arbitrary windows. All adviced functions
+   behave as their originals. So the frame can be used as if ECB would not be
+   active but ECB IS still active in the "background" and all ECB-commands and
+   all ECB-keybindings can be used. Of course some of them doesn't make much
+   sense but nevertheless they can be called.
+
+   Therefore it should be enough to hide the ECB-windows to run other
+   Emacs-applications which have their own window-layout-managing. There
+   should be no conflicts. But nevertheless the most recommended method for
+   running ECB and other applications (e.g. xrefactory, Gnus etc.) in the same
+   frame is to use a window-manager like winring.el or escreen.el!
+
+** Ediff runs per default in the ECB-frame.
+   Now ediff can run per default in the ECB-frame because ECB ensures that all
+   special ECB-windows are hidden before ediff sets up its own window-layout.
+   ECB also restores exactly the "before-ediff" window-layout of the ecb-frame
+   See new option `ecb-run-ediff-in-ecb-frame'.
+
+** More flexible directory-caching with new `ecb-cache-directory-contents-not'
+      
+** New option `ecb-advice-window-functions-signal-error'
+   Now the adviced window functions of `ecb-advice-window-functions' do not
+   signal per default an error if called in situations which are not allowed -
+   they simple do nothing. An example is calling `delete-window' in a special
+   ecb-window or in the compile-window; if this new option is nil then nothing
+   is done otherwise an error is signaled. If you want the old behavior of
+   signaling an error just set this new option to not nil.
+
+** Fixed Bugs
+
+*** When the special ECB-windows were hidden and a durable compile-window was set
+    then ECB shows the special ECB-windows when a temp-buffer (e.g.
+    *Help*-buffers) has been displayed. This annoying behavior is fixed.
+
+*** XEmacs has not added the ECB-menu to the menubar of that buffers which are
+    already alive while activating ECB. On the other side XEmacs has not
+    removed the ECB-menu from the menubar for all living buffers after
+    deactivating ECB. Both of these two bugs are fixed now.
+
+*** JDEE-dialogs now work correctly.
+    JDEE offers sometimes "dialogs" where the user can choose among several
+    options. These "dialogs" now work correctly regardless if a durable
+    compile-window is used or not.
+
+*** A bug in displaying the tree-buffers in a different font or font-height
+
+
+
 * Changes for ECB version 1.96
 
 ** ECB can work together with the window-managers escreen and winring
-README for the Emacs Code Browser (ECB) version 1.96
+README for the Emacs Code Browser (ECB) version 2.11
 
 
 About
 submitting problem-reports to the ECB-maintainers!
 
 
+Using the beta of cedet 1.0 (contains semantic 2.0)
+---------------------------------------------------
+
+From beginning with version 2.01 ECB supports the next generation of the
+cedet-tools. But before the cedet 1.0 suite becomes stable this means that ECB
+runs correctly with loaded cedet 1.0 but the ECB-upgrading festure does not
+support autom. upgrading to latest available cedet versions. This will be
+first available after first stable release of the new cedet-library 1.0.
+
+So, if the cedet 1.0 suite is loaded then the min- and max-version of
+semantic, eieio and speedbar (mentioned in the Requirements-section above)
+have no relevance!
+
+
 Installation
 ------------
 
 
 2. Install the required semantic-, eieio- and speedbar-version.
 
-   *Note*: ECB maybe requires a newer version of these libraries than shipped
+   *Note 1*: If the new cedet 1.0 suite should be used then just install and
+   load cedet 1.0 like described in the cedet-installation-instructions and go
+   one with step 3.
+
+   *Note 2*: ECB maybe requires a newer version of these libraries than shipped
    with (X)Emacs. You have to install exactly a version ECB requires and also
    to make sure that the correct version is loaded into (X)Emacs!
 
-This file contains some important release-notes for ECB version 1.96
+This file contains some important release-notes for ECB version 2.11
 
 General:
 --------
 No special notes beyond the contents of README.
 
 
-Upgrading from any version:
----------------------------
+Upgrading from versions < 2.01:
+-------------------------------
 
-The options `ecb-mode-line-data' and `ecb-mode-line-prefixes' have chenged
+The following options have changed their name:
+
+- ecb-auto-expand-token-tree           -> ecb-auto-expand-tag-tree
+- ecb-font-lock-tokens                 -> ecb-font-lock-tags
+- ecb-token-jump-sets-mark             -> ecb-tag-jump-sets-mark
+- ecb-token-display-function           -> ecb-tag-display-function
+- ecb-type-token-display               -> ecb-type-tag-display
+- ecb-post-process-semantic-tokenlist  -> ecb-post-process-semantic-taglist
+- ecb-show-only-positioned-tokens      -> ecb-show-only-positioned-tags
+- ecb-show-tokens                      -> ecb-show-tags
+- ecb-highlight-token-with-point       -> ecb-highlight-tag-with-point
+- ecb-highlight-token-with-point-delay -> ecb-highlight-tag-with-point-delay
+- ecb-token-visit-post-actions         -> ecb-tag-visit-post-actions
+- ecb-token-header-face                -> ecb-tag-header-face
+
+ECB autom. upgrades all old-values of these options to the new options! There
+is nothing to do for you.
+
+The type of the options `ecb-directories-menu-user-extension',
+`ecb-sources-menu-user-extension', `ecb-methods-menu-user-extension' and
+`ecb-history-menu-user-extension' has been changed - now sub-menus are
+allowed. The new default values of these options contains now entries, mostly
+concerning "version control". ECB autom. upgrades the old-values to the new
+option-type by appending the new defaults to your old values. So no old
+personal menu-entries are lost, but cause of the new default maybe you have
+some entries twice. Feel free to delete via customize what you want from the
+new settings.
+
+The old option `ecb-tree-use-image-icons' has been replaced by
+`ecb-tree-buffer-style'.
+
+
+Upgrading from versions < 1.96:
+-------------------------------
+
+The options `ecb-mode-line-data' and `ecb-mode-line-prefixes' have changed
 their type. ECB will autom. upgrade the old values of these options as best as
 possible to the new types!
 
 (eval-when-compile
   (require 'silentcomp))
 
+(silentcomp-defun set-face-parent)
+(silentcomp-defun make-face-bold)
+(silentcomp-defun make-face)
+(silentcomp-defun set-face-foreground)
+
 (defgroup ecb-face-options nil
   "Settings for all faces used in ECB."
   :group 'ecb
 'ecb-default-general-face'!"
   :group 'ecb-faces)
 
+(defface ecb-tree-guide-line-face (ecb-face-default 1.0 nil nil
+                                                    'ecb-default-general-face
+                                                    "grey" "gray")
+  "*Face for the guide-lines in the tree-buffers."
+  :group 'ecb-faces)
+
+(defcustom ecb-tree-guide-line-face 'ecb-tree-guide-line-face
+  "*Face for the guide-lines in the tree-buffers."
+  :group 'ecb-face-options)
+
 (defface ecb-directories-general-face (ecb-face-default 1.0 nil nil
                                                         'ecb-default-general-face)
   "*Basic face for the ECB directories buffer.
                 (face :tag "Special face"
                       :value ecb-history-general-face)))
 
-;; this face should also inherit from 'ecb-default-general-face': Then
-;; changing the font in 'ecb-default-general-face' changes the font in all
-;; faces of the tree-buffers.
 (defface ecb-default-highlight-face (ecb-face-default nil nil nil
-                                                      'ecb-default-general-face
+                                                      nil ;'ecb-default-general-face
                                                       "yellow" nil
                                                       "cornflower blue" "magenta"
                                                       nil nil t)
   "*Define basic face for highlighting the selected node in a tree-buffer.
 In GNU Emacs 21.X all highlighting faces in the ECB tree-buffers inherit from
 this face. Therefore the default attributes like font etc. of a face used in a
-tree-buffer for highlighting the current token can be very easily changed with
+tree-buffer for highlighting the current tag can be very easily changed with
 face 'ecb-default-highlight-face'.
 
 With XEmacs and GNU Emacs 20.X there is no inheritance-feature but the options
                                            "yellow" nil
                                            "cornflower blue" "magenta"
                                            nil nil t)
-  "*Define face used for highlighting current token in the methods buffer."
+  "*Define face used for highlighting current tag in the methods buffer."
   :group 'ecb-faces)
 
 (defcustom ecb-method-face 'ecb-default-highlight-face
-  "*Face used for highlighting current token in the methods buffer.
+  "*Face used for highlighting current tag in the methods buffer.
 If the face 'ecb-default-highlight-face' is used then the display of all
 ECB-tree-buffers can be changed by modifying only the face
 'ecb-default-highlight-face'.
                       :value ecb-method-face)))
 
 (defface ecb-method-non-semantic-face (ecb-face-default nil nil nil
-                                           'ecb-methods-general-face
-                                           "brown" "brown")
-  "*Define face used for displaying tokens of non-semantic-sources."
+                                                        'ecb-methods-general-face
+                                                        "brown" "brown")
+  "*Define face used for displaying tags of non-semantic-sources."
   :group 'ecb-faces)
 
 (defcustom ecb-method-non-semantic-face 'speedbar-tag-face
-  "*Face used for for displaying tokens of non-semantic-sources.
+  "*Face used for for displaying tags of non-semantic-sources.
 Default is the face used by speedbar for tags.
 
 Changes take first effect after finishing and reactivating ECB!"
                 (face :tag "Special face"
                       :value ecb-history-face)))
 
-(defface ecb-token-header-face (ecb-face-default nil nil nil nil nil nil
-                                                 "SeaGreen1" "SeaGreen1"
-                                                 nil nil t)
-  "*Define face used for highlighting the token header.
-The token header is the first line of the token which is highlighted after
+(defface ecb-tag-header-face (ecb-face-default nil nil nil nil nil nil
+                                               "SeaGreen1" "SeaGreen1"
+                                               nil nil t)
+  "*Define face used for highlighting the tag header.
+The tag header is the first line of the tag which is highlighted after
 jumping to it by clicking onto a node in the methods buffer."
   :group 'ecb-faces)
   
-(defcustom ecb-token-header-face 'ecb-token-header-face
-  "*Face used for highlighting the token header.
-The token header is the first line of the token which is highlighted after
+(defcustom ecb-tag-header-face 'ecb-tag-header-face
+  "*Face used for highlighting the tag header.
+The tag header is the first line of the tag which is highlighted after
 jumping to it by clicking onto a node in the methods buffer."
   :group 'ecb-face-options
   :group 'ecb-methods
   :group 'ecb-face-options
   :type 'face)
 
-(defface ecb-type-token-class-face (ecb-face-default nil t)
-  "*Define face used with option `ecb-type-token-display'."
+(defface ecb-type-tag-class-face (ecb-face-default nil t)
+  "*Define face used with option `ecb-type-tag-display'."
   :group 'ecb-faces)
 
-(defface ecb-type-token-interface-face (ecb-face-default nil t)
-  "*Define face used with option `ecb-type-token-display'."
+(defface ecb-type-tag-interface-face (ecb-face-default nil t)
+  "*Define face used with option `ecb-type-tag-display'."
   :group 'ecb-faces)
 
-(defface ecb-type-token-struct-face (ecb-face-default nil t)
-  "*Define face used with option `ecb-type-token-display'."
+(defface ecb-type-tag-struct-face (ecb-face-default nil t)
+  "*Define face used with option `ecb-type-tag-display'."
   :group 'ecb-faces)
 
-(defface ecb-type-token-typedef-face (ecb-face-default nil t)
-  "*Define face used with option `ecb-type-token-display'."
+(defface ecb-type-tag-typedef-face (ecb-face-default nil t)
+  "*Define face used with option `ecb-type-tag-display'."
   :group 'ecb-faces)
 
-(defface ecb-type-token-enum-face (ecb-face-default nil t)
-  "*Define face used with option `ecb-type-token-display'."
+(defface ecb-type-tag-union-face (ecb-face-default nil t)
+  "*Define face used with option `ecb-type-tag-display'."
   :group 'ecb-faces)
 
-(defface ecb-type-token-group-face (ecb-face-default nil t nil nil
-                                                     (if ecb-running-xemacs
-                                                         "dimgray"
-                                                       "dim gray")
-                                                     (if ecb-running-xemacs
-                                                         "dimgray"
-                                                       "dim gray"))
-  "*Define face used with option `ecb-type-token-display'."
+(defface ecb-type-tag-enum-face (ecb-face-default nil t)
+  "*Define face used with option `ecb-type-tag-display'."
   :group 'ecb-faces)
 
-(defface ecb-bucket-token-face (ecb-face-default nil t nil
-                                                 'ecb-default-general-face)
-  "*Face used for displaying bucket tokens in the methods buffer.
-See also `ecb-bucket-token-display'.
+(defface ecb-type-tag-group-face (ecb-face-default nil t nil nil
+                                                   (if ecb-running-xemacs
+                                                       "dimgray"
+                                                     "dim gray")
+                                                   (if ecb-running-xemacs
+                                                       "dimgray"
+                                                     "dim gray"))
+  "*Define face used with option `ecb-type-tag-display'."
+  :group 'ecb-faces)
+
+(defface ecb-bucket-node-face (ecb-face-default nil t nil
+                                                'ecb-default-general-face)
+  "*Face used for displaying bucket-nodes in the ECB-buffers.
+See also `ecb-bucket-node-display'.
 
 In GNU Emacs 21.X this face inherits from the face 'ecb-default-general-face'.
 
 With XEmacs and GNU Emacs 20.X there is no inheritance-feature so if the
-buckets in the ECB-methods-buffer should be displayed with the same basic
+buckets in the ECB-buffers should be displayed with the same basic
 attributes set by 'ecb-default-general-face' this set of basic attributes have
-to be set in 'ecb-bucket-token-face' too!"
-:group 'ecb-faces)
+to be set in 'ecb-bucket-node-face' too!"
+  :group 'ecb-faces)
+
+;; - mode-line faces-------------------------------------------
+
+;; For XEmacs a face in the modeline should really inhertit from the face
+;; 'modeline!
+;; TODO: Klaus Berndl <klaus.berndl@sdm.de>: Currently with XEmacs 21.4.X
+;; set-face-parent MUST be before defface - therefore we have to use make-face
+;; first and then adding the values to this face we would have also added
+;; by`defface. The defface is here only used to make this face customizable!
+;; Maybe later XEmacs-versions support the parent-keyword with defface then we
+;; can change back this ugly hack.
+(when ecb-running-xemacs
+  (make-face 'ecb-mode-line-win-nr-face)
+  (set-face-parent 'ecb-mode-line-win-nr-face 'modeline nil '(default))
+  (make-face-bold 'ecb-mode-line-win-nr-face))
+(defface ecb-mode-line-win-nr-face (ecb-face-default nil t)
+  "*Define face for the window-number in the mode-line.
+See `ecb-mode-line-display-window-number'."
+  :group 'ecb-faces)
+
+(defcustom ecb-mode-line-win-nr-face 'ecb-mode-line-win-nr-face
+  "*Face used for the window-number in the mode-line.
+See `ecb-mode-line-display-window-number'. For XEmacs the face should inherit
+from the face 'modeline \(see `set-face-parent')!"
+  :group 'ecb-mode-line
+  :group 'ecb-face-options
+  :type 'face)
+
+(when ecb-running-xemacs
+  (make-face 'ecb-mode-line-prefix-face)
+  (set-face-parent 'ecb-mode-line-prefix-face 'modeline nil '(default))
+  (set-face-foreground 'ecb-mode-line-prefix-face "forestgreen"))
+;;                        nil '(default color win)))
+(defface ecb-mode-line-prefix-face (ecb-face-default nil nil nil nil
+                                                     "forestgreen"
+                                                     "forestgreen")
+  "*Define face for the prefix in the mode-line.
+See `ecb-mode-line-prefixes'."
+  :group 'ecb-faces)
+
+(defcustom ecb-mode-line-prefix-face 'ecb-mode-line-prefix-face
+  "*Face used for the prefix in the mode-line.
+See `ecb-mode-line-prefixes'. For XEmacs the face should inherit from the face
+'modeline \(see `set-face-parent')!"
+  :group 'ecb-mode-line
+  :group 'ecb-face-options
+  :type 'face)
+
+(when ecb-running-xemacs
+  (make-face 'ecb-mode-line-data-face)
+  (set-face-parent 'ecb-mode-line-data-face 'modeline nil '(default)))
+(defface ecb-mode-line-data-face (ecb-face-default)
+  "*Define face for the data in the mode-line.
+See `ecb-mode-line-data'."
+  :group 'ecb-faces)
+
+(defcustom ecb-mode-line-data-face 'ecb-mode-line-data-face
+  "*Face used for the data in the mode-line.
+See `ecb-mode-line-data'. For XEmacs the face should inherit from the face
+'modeline \(see `set-face-parent')!"
+  :group 'ecb-mode-line
+  :group 'ecb-face-options
+  :type 'face)
+
+
 
 (silentcomp-provide 'ecb-face)
 
 problem-report subject and then you must insert a description of the problem.
 Please describe the problem as detailed as possible!"
   (interactive)
-  (if (and (equal ecb-frame (selected-frame))
-           (not (ecb-point-in-edit-window)))
-      (ecb-select-edit-window))
-  (if (not (locate-library "reporter"))
-      (ecb-error "You need the reporter.el package to submit a bugreport for ECB!")
-    (require 'reporter)
-    (and 
-     (y-or-n-p "Do you want to submit a problem report on the ECB? ")
-     (progn
-       (message "Preparing problem report...")
-       ;;prepare the basic buffer
-       (reporter-submit-bug-report
-        ecb-problem-report-mail-address
-        (format "ECB: %s, semantic: %s, eieio: %s, speedbar: %s, JDEE: %s"
-                ecb-version
-                semantic-version
-                eieio-version
-                speedbar-version
-                (if (boundp 'jde-version)
-                    jde-version
-                  "No JDEE"))
-        (ecb-problem-report-list-all-variables)
-        nil
-        'ecb-problem-report-post-hook
-        ecb-problem-report-message)
-       (if (equal ecb-frame (selected-frame))
-           (ecb-redraw-layout))
-       (mail-subject)
-       (insert (read-string "Problem report subject: "
-                            (format "ECB-%s -- " ecb-version)))
-       (mail-text)
-       (search-forward ecb-problem-report-message)
-       (end-of-line)
-       (message "Preparing bug report...done")))))
+  (when (or ecb-minor-mode
+            (y-or-n-p "ECB should be active when submitting a problem-report. Force report? "))
+    (if (and (equal ecb-frame (selected-frame))
+             (not (ecb-point-in-edit-window)))
+        (ecb-select-edit-window))
+    (if (not (locate-library "reporter"))
+        (ecb-error "You need the reporter.el package to submit a bugreport for ECB!")
+      (require 'reporter)
+      (progn
+        (message "Preparing problem report...")
+        ;;prepare the basic buffer
+        (reporter-submit-bug-report
+         ecb-problem-report-mail-address
+         (format "ECB: %s, semantic: %s, eieio: %s, speedbar: %s, JDEE: %s"
+                 ecb-version
+                 semantic-version
+                 eieio-version
+                 speedbar-version
+                 (if (boundp 'jde-version)
+                     jde-version
+                   "No JDEE"))
+         (ecb-problem-report-list-all-variables)
+         nil
+         'ecb-problem-report-post-hook
+         ecb-problem-report-message)
+        (if (equal ecb-frame (selected-frame))
+            (ecb-redraw-layout))
+        (mail-subject)
+        (insert (read-string "Problem report subject: "
+                             (format "ECB-%s -- " ecb-version)))
+        (mail-text)
+        (search-forward ecb-problem-report-message)
+        (end-of-line)
+        (message "Preparing bug report...done")))))
 
 (defun ecb-problem-report-post-hook()
   "Function run the reporter package done its work. It looks for a message- and
                           (function (lambda (l r)
                                       (string< (symbol-name l)
                                                (symbol-name r))))))
-        (semantic-vars (sort `(semantic-after-toplevel-cache-change-hook
-                               semantic-after-partial-cache-change-hook
-                               semantic-face-alist
-                               semantic-uml-colon-string
-                               semantic-orphaned-member-metaparent-type)
+        (semantic-vars (sort (delete nil
+                                     `(semantic-after-toplevel-cache-change-hook
+                                       semantic-after-partial-cache-change-hook
+                                       ,(if (boundp 'semantic-format-face-alist)
+                                            'semantic-format-face-alist
+                                          'semantic-face-alist)
+                                       semantic-uml-colon-string
+                                       semantic-orphaned-member-metaparent-type))
                              (function (lambda (l r)
                                          (string< (symbol-name l)
                                                   (symbol-name r))))))
 
 (require 'ecb-util)
 (require 'ecb-layout)
+(require 'ecb-file-browser)
+(require 'ecb-method-browser)
 
 (defun ecb-jde-display-class-at-point ()
   "Displays in the ECB-methods-buffer contents of class under point.
 (silentcomp-defun fit-window-to-buffer)
 (silentcomp-defvar temp-buffer-resize-mode)
 
+(eval-when-compile
+  ;; to avoid compiler grips
+  (require 'cl))
+
 (defvar ecb-layouts-reload-needed t)
 (defun ecb-load-layouts ()
   "Load all defined layouts"
                        :value half)
                 (number :tag "Height" :value 0.3)))
 
+(defcustom ecb-ignore-special-display 'compile-window
+  "*Ignore special-display-handling.
+This means, that all values of `special-display-function',
+`special-display-buffer-names' and `special-display-regexps' are ignored
+- only when durable compile window is used - i.e. if
+  `ecb-compile-window-height' is not nil - this is the default value.
+- always when ECB is active - that means no special-display-handling of
+  buffers when ECB is active
+- never, i.e. special-dislay-handling depends on the values of the options
+  `special-display-function', `special-display-buffer-names' and
+  `special-display-regexps'."
+  :group 'ecb-layout
+  :type '(radio (const :tag "When a durable compile-window is used"
+                       :value compile-window)
+                (const :tag "Always" :value always)
+                (const :tag "Never" nil)))
+
+(defsubst ecb-ignore-special-display ()
+  (or (equal ecb-ignore-special-display 'always)
+      (and (equal ecb-ignore-special-display 'compile-window)
+           (numberp (car (get 'ecb-compile-window-height 'saved-value))))))
+
 (defcustom ecb-split-edit-window t
   "*Sets how and if the edit window should be splitted.
 But be aware: This option determines only if the edit-window should be
          (ecb-set-window-size-fixed nil)
          ,@body)
      (ecb-set-window-size-fixed (ecb-get-window-fix-type ecb-layout-name))))
-  
 
 
 (defcustom ecb-other-window-jump-behavior 'all
               (const :tag "other-window-for-scrolling"
                      :value other-window-for-scrolling)))
 
-;; TODO: Klaus Berndl <klaus.berndl@sdm.de>:
-;; - zu texi hinzuf�gen
-;; - eventuell hier nil als Default?!
-(defcustom ecb-advice-window-functions-signal-error t
+(defcustom ecb-advice-window-functions-signal-error nil
   "*Signal an error if an adviced function can not do its job.
 If not nil then an error is signaled if one of the adviced functions \(see
-`ecb-advice-window-functions') can not its job. So for example if the user
+`ecb-advice-window-functions') can not do its job. So for example if the user
 tries to split the compile-window or an ecb-tree-window or if one tries to
 switch to another buffer in one of the ecb-tree-windows. For details see the
 documentation of each of the adviced functions to get info when an error is
 If this option is nil then no error is signaled but the called adviced
 function does simply nothing.
 
-Default is t but it can also be useful not to signal errors - especially if
-there are conflicts with other packages."
+Default is nil but it can also be useful to signal errors - so you see when
+call a function in a situation which is not supported by this function."
   :group 'ecb-layout
   :type 'boolean)
 
 (defcustom ecb-layout-always-operate-in-edit-window
-  '(delete-window
-    delete-other-windows
-    display-buffer
+  '(display-buffer
     switch-to-buffer)
   "*Adviced window functions work always in the edit-window.
 If we are in an ECB special buffer (methods, directories, etc), and any of the
         ecb-last-compile-buffer-in-compile-window nil
         ecb-current-maximized-ecb-buffer-name nil
         ecb-cycle-ecb-buffer-state nil
+        ecb-windows-hidden nil
         ecb-compile-window nil
         ecb-compile-window-was-selected-before-command nil))
 
 
 
 (defun ecb-compile-window-live-p (&optional display-msg)
-  (if (and ecb-compile-window (window-live-p ecb-compile-window))
+  (if (and ecb-compile-window
+           (window-live-p ecb-compile-window)
+           (not ecb-windows-hidden))
       t
     (if display-msg
         (message "No compile-window visible in current ECB-layout!"))
 
 (defadvice compilation-set-window-height (around ecb)
   "Makes the function compatible with ECB."
-  (if (not (equal (window-frame (ad-get-arg 0)) ecb-frame))
-      ad-do-it
+  (if (or (not (equal (window-frame (ad-get-arg 0)) ecb-frame))
+          ecb-windows-hidden)
+      (ecb-with-original-basic-functions
+       (ecb-with-original-functions
+        ad-do-it))
     (if (and (equal (ad-get-arg 0) ecb-compile-window)
              (member ecb-compile-window-temporally-enlarge
                      '(after-selection nil)))
 and always return 1 if point is not in an edit-window. In any other frame or
 if `scroll-all-mode' is nil return the number of visible windows."
   (if (and (equal (selected-frame) ecb-frame)
+           ecb-minor-mode
+           (not ecb-windows-hidden)
            (boundp 'scroll-all-mode)
            scroll-all-mode)
       (setq ad-return-value (if (and (ecb-point-in-edit-window)
                                      (ecb-edit-window-splitted))
                                 2
                               1))
-    ad-do-it))
+    (ecb-with-original-basic-functions
+     (ecb-with-original-functions
+      ad-do-it))))
 
 
 ;; This function must safely work even if `ecb-edit-window' is not longer alive,
                                 (ad-get-arg 0))
         (if (or (not ecb-minor-mode)
                 (not (equal (window-frame (ad-get-arg 0)) ecb-frame))
+                ecb-windows-hidden
                 (member (ad-get-arg 0) (ecb-canonical-ecb-windows-list)))
-            ad-do-it
+            (ecb-with-original-basic-functions
+             (ecb-with-original-functions
+              ad-do-it))
 
           ;; we handle only the edit-windows and the compile-window of the
           ;; ecb-frame in a special manner.
         "Chooses the window with the ECB-adviced version of `display-buffer'."
         (ecb-with-adviced-functions
          ad-do-it)
-        (when (ecb-point-in-compile-window)
+        (when (and (equal (selected-frame) ecb-frame)
+                   (not ecb-windows-hidden)
+                   (ecb-point-in-compile-window))
           ;; we set the height of the compile-window according to
           ;; `ecb-enlarged-compilation-window-max-height'
           (ecb-set-compile-window-height)))
 for current layout."
     (if (and ecb-minor-mode
              (equal (selected-frame) ecb-frame)
+             (not ecb-windows-hidden)
              (ecb-get-window-fix-type ecb-layout-name))
         (ecb-do-with-unfixed-ecb-buffers ad-do-it)
       ad-do-it))
 for current layout."
     (if (and ecb-minor-mode
              (equal (selected-frame) ecb-frame)
+             (not ecb-windows-hidden)
              (ecb-get-window-fix-type ecb-layout-name)
              (member (car (car (cdr (ad-get-arg 0)))) ;; the window of the event
                      (ecb-canonical-ecb-windows-list)))
 for current layout."
     (if (and ecb-minor-mode
              (equal (selected-frame) ecb-frame)
+             (not ecb-windows-hidden)
              (ecb-get-window-fix-type ecb-layout-name)
              (member (selected-window) (ecb-canonical-ecb-windows-list)))
         (ecb-do-with-unfixed-ecb-buffers ad-do-it)
 for current layout."
     (if (and ecb-minor-mode
              (equal (selected-frame) ecb-frame)
+             (not ecb-windows-hidden)
              ;; See comment of defadvice for mouse-drag-mode-line
              (ecb-get-window-fix-type ecb-layout-name)
              (member (selected-window) (ecb-canonical-ecb-windows-list)))
   (defadvice tmm-menubar (around ecb)
     "Make it compatible with ECB."
     (if (or (not ecb-minor-mode)
-            (not (equal (selected-frame) ecb-frame)))
-        ad-do-it
+            (not (equal (selected-frame) ecb-frame))
+            ecb-windows-hidden)
+        (ecb-with-original-basic-functions
+         (ecb-with-original-functions
+          ad-do-it))
       (let ((ecb-other-window-jump-behavior 'only-edit)
             ;; we must not handle the tmm-stuff as compilation-buffer
             (ecb-compilation-buffer-names nil)
                             (ad-get-arg 0))
     (if (or (not ecb-minor-mode)
             (not (equal (window-frame (ad-get-arg 0)) ecb-frame))
+            ecb-windows-hidden
             (member (ad-get-arg 0) (ecb-canonical-ecb-windows-list)))
-        ad-do-it
+        (ecb-with-original-basic-functions
+         (ecb-with-original-functions
+          ad-do-it))
       (save-selected-window
         (select-window (ad-get-arg 0))
         (ecb-layout-debug-error "shrink-window-if-larger-than-buffer: buffer to shrink: %s"
 
   (defadvice resize-temp-buffer-window (around ecb)
     "Makes the function compatible with ECB."
-    (ecb-layout-debug-error "resize-temp-buffer-window: buffer: %s"
-                            (current-buffer))
+    (ecb-layout-debug-error "resize-temp-buffer-window: buffer: %s, window: %s, frame: %s"
+                            (current-buffer) (selected-window) (selected-frame))
     (if (or (not ecb-minor-mode)
             (not (equal (selected-frame) ecb-frame))
+            ecb-windows-hidden
             (equal (ecb-where-is-point) 'ecb))
-        ad-do-it
+        (ecb-with-original-basic-functions
+         (ecb-with-original-functions
+          ad-do-it))
       (if (and (equal (selected-window) ecb-compile-window)
                (member ecb-compile-window-temporally-enlarge
                        '(after-selection nil))
   (defadvice pop-to-buffer (around ecb)
     "Chooses the window with the ECB-adviced version of `display-buffer'."
     (if (or (not ecb-minor-mode)
-            (null (ad-get-arg 0)))
-        ad-do-it
+            (null (ad-get-arg 0))
+            ecb-windows-hidden)
+        (ecb-with-original-basic-functions
+         (ecb-with-original-functions
+          ad-do-it))
       (condition-case nil
           (progn
             (ecb-layout-debug-error "pop-to-buffer: buffer: %s, %s"
     (ecb-layout-debug-error "ecb-temp-buffer-show-function-emacs: comp-buffer: %s"
                             buf)
     (when (and (equal (selected-frame) ecb-frame)
+               (not ecb-windows-hidden)
                (numberp (car (get 'ecb-compile-window-height 'saved-value)))
                (not (ecb-compile-window-live-p))
                ;; calling this from minibuffer (e.g. completions)
 (defvar ecb-temp-buffer-show-function-old nil)
 
 (defun ecb-enable-own-temp-buffer-show-function (arg)
-  "if ARG then set `temp-buffer-show-function' to the right function so ECB
+  "If ARG then set `temp-buffer-show-function' to the right function so ECB
 works correct. Store the old value. If ARG is nil then restore the old value
 of `temp-buffer-show-function'."
   (if arg
 
 (defun ecb-point-in-compile-window ()
   "Return non nil iff point is in the compile-window of ECB"
-  (and ecb-compile-window
-       (equal (selected-frame) ecb-frame)
+  (and (equal (selected-frame) ecb-frame)
+       (ecb-compile-window-live-p)
        (equal (selected-window) ecb-compile-window)))
 
 
 
 (defun ecb-layout-pre-command-hook ()
   "During activated ECB this function is added to `pre-command-hook' to set
-always `ecb-last-edit-window-with-point', `ecb-last-source-buffer' and
-`ecb-compile-window-was-selected-before-command' correct so other functions
-can use these variables."
+always `ecb-last-edit-window-with-point', `ecb-last-source-buffer',
+`ecb-compile-window-was-selected-before-command' and
+`ecb-last-compile-buffer-in-compile-window' correct so other functions
+can use these variables. In addition it checks if the `ecb-edit-window' is
+still alive if the special ecb-windows are hidden \(`ecb-windows-hidden' is
+not nil) and if it is not alive then it will be set to the left- topmost
+window of the ecb-frame."
   (when (and ecb-minor-mode
              (equal (selected-frame) ecb-frame))
+    (when (and ecb-windows-hidden
+               (not (ecb-edit-window-live-p)))
+      (setq ecb-edit-window (frame-first-window ecb-frame)))
     (when (ecb-point-in-edit-window)
       (setq ecb-last-edit-window-with-point (selected-window))
       (setq ecb-last-source-buffer (current-buffer)))
 
 ;; here come the advices
 
+(defun ecb-check-for-special-buffer (buffer-or-name)
+  "Return  not nil if and only if `special-display-function' is not nil and
+BUFFER-OR-NAME is contained or matches `special-display-buffer-names' or
+`special-display-regexps'."
+  (let ((result
+         (if (ecb-ignore-special-display)
+             nil
+           (catch 'done
+             (let ((buf-name (cond ((stringp buffer-or-name)
+                                    buffer-or-name)
+                                   ((bufferp buffer-or-name)
+                                    (buffer-name buffer-or-name))
+                                   (t nil))))
+               (when (and buf-name special-display-function)
+                 (if (member buf-name
+                             special-display-buffer-names)
+                     (throw 'done t))
+      
+                 (let ((tem (assoc buf-name
+                                   special-display-buffer-names)))
+                   (if tem
+                       (throw 'done t)))
+
+                 (let ((tem special-display-regexps))
+                   (while tem
+                     (let ((car (car tem)))
+                       (if (and (stringp car)
+                                (string-match car buf-name))
+                           (throw 'done t))
+                       (if (and (consp car)
+                                (stringp (car car))
+                                (string-match (car car) buf-name))
+                           (throw 'done t)))
+                     (setq tem (cdr tem))))))))))
+    (ecb-layout-debug-error "ecb-check-for-special-buffer for %s: %s"
+                            buffer-or-name result)
+    result))
+    
+
+
 ;; This advice is the heart of the mechanism which displays all buffer in the
 ;; compile-window if they are are "compilation-buffers" in the sense of
 ;; `ecb-compilation-buffer-p'!
 `display-buffer' then the buffer is displayed in the edit-window without
 splitting it \(if unsplitted).
 
+If BUFFER is contained in `special-display-buffer-names' or matches
+`special-display-regexps' then `special-display-function' will be called \(if
+not nil). But this behavior depends on the value of the option
+`ecb-ignore-special-display'.
+
 If called for other frames it works like the original version."
   (if ecb-running-xemacs
       (ecb-layout-debug-error "display-buffer entered with: %s %s %s %s"
                (and (or (null (ad-get-arg 2))
                         (equal (ad-get-arg 2) t)
                         (equal (ad-get-arg 2) 0))
-                    (equal (selected-frame) ecb-frame))))
-      (cond ((ecb-compilation-buffer-p (ad-get-arg 0))
-             (ecb-layout-debug-error "display-buffer for a comp-buffer: %s"
-                                     (ad-get-arg 0))
-             ;; we have to display the buffer in the compile-window if a
-             ;; compile-window was set but currently hidden --> then we have
-             ;; to show it now. `ecb-toggle-compile-window' preserves always
-             ;; the selected window!
-             (when (and (numberp (car (get 'ecb-compile-window-height 'saved-value)))
-                        (not (ecb-compile-window-live-p))
-                        ;; calling this from minibuffer (e.g. completions)
-                        ;; seems to cause problems
-                        (not (equal (minibuffer-window ecb-frame) (selected-window))))
-               (ecb-layout-debug-error "display-buffer: comp-win will be toggled.")
-               (ecb-toggle-compile-window 1))
-             (if (ecb-compile-window-live-p)
-                 ;; now we have to make the edit-window(s) dedicated
-                 (let ((edit-window-list (if (ecb-edit-window-splitted)
-                                             (list ecb-edit-window
-                                                   (next-window
-                                                    ecb-edit-window))
-                                           (list ecb-edit-window))))
+                    (equal (selected-frame) ecb-frame)))
+           (not ecb-windows-hidden)
+           (not (ecb-check-for-special-buffer (ad-get-arg 0))))
+      (let ((special-display-function (if (ecb-ignore-special-display)
+                                          nil
+                                        special-display-function)))
+        (cond ((ecb-compilation-buffer-p (ad-get-arg 0))
+               (ecb-layout-debug-error "display-buffer for a comp-buffer: %s"
+                                       (ad-get-arg 0))
+               ;; we have to display the buffer in the compile-window if a
+               ;; compile-window was set but currently hidden --> then we have
+               ;; to show it now. `ecb-toggle-compile-window' preserves always
+               ;; the selected window!
+               (when (and (numberp (car (get 'ecb-compile-window-height 'saved-value)))
+                          (not (ecb-compile-window-live-p))
+                          ;; calling this from minibuffer (e.g. completions)
+                          ;; seems to cause problems
+                          (not (equal (minibuffer-window ecb-frame) (selected-window))))
+                 (ecb-layout-debug-error "display-buffer: comp-win will be toggled.")
+                 (ecb-toggle-compile-window 1))
+               (if (ecb-compile-window-live-p)
+                   ;; now we have to make the edit-window(s) dedicated
+                   (let ((edit-window-list (if (ecb-edit-window-splitted)
+                                               (list ecb-edit-window
+                                                     (next-window
+                                                      ecb-edit-window))
+                                             (list ecb-edit-window))))
+                     (unwind-protect
+                         (progn
+                           (mapc (function (lambda (w)
+                                             (set-window-dedicated-p w t)))
+                                 edit-window-list)
+                           ;; now we perform the original `display-buffer' but
+                           ;; now the only not dedicated window is the compile
+                           ;; window so `display-buffer' MUST use this.
+                           (if (equal (selected-window) ecb-compile-window)
+                               ;; `display-buffer' tries to split the
+                               ;; compile-window if it is called from the
+                               ;; compile-window (e.g. calling help from the
+                               ;; compile-window). To avoid this we must
+                               ;; temporally set `pop-up-windows' to nil so
+                               ;; `display-buffer' tries no splitting. But this
+                               ;; works only for GNU Emacs. XEmacs does not
+                               ;; shrink to fit if `pop-up-windows' is nil so we
+                               ;; must set it here to t and make the frame
+                               ;; unsplittable.
+                               (let ((pop-up-windows (if ecb-running-xemacs t nil)))
+                                 (ecb-layout-debug-error
+                                  "display-buffer from comp-win for comp-buf: %s"
+                                  (ad-get-arg 0))
+                                 (if ecb-running-xemacs
+                                     (unwind-protect
+                                         (progn
+                                           (set-frame-property ecb-frame
+                                                               'unsplittable t)
+                                           (setq ad-return-value
+                                                 (ecb-display-buffer-xemacs (ad-get-arg 0)
+                                                                            (ad-get-arg 1)
+                                                                            (ad-get-arg 2)
+                                                                            (ad-get-arg 3))))
+                                       (set-frame-property ecb-frame
+                                                           'unsplittable nil))
+                                   ad-do-it))
+                             (if ecb-running-xemacs
+                                 (setq ad-return-value
+                                       (ecb-display-buffer-xemacs (ad-get-arg 0)
+                                                                  (ad-get-arg 1)
+                                                                  (ad-get-arg 2)
+                                                                  (ad-get-arg 3)))
+                               ad-do-it)))
+                       ;; making the edit-window(s) not dedicated
+                       (mapc (function (lambda (w)
+                                         (set-window-dedicated-p w nil)))
+                             edit-window-list))
+                     ;; if called interactively we run now our
+                     ;; `ecb-toggle-compile-window-height' to set the height of
+                     ;; the compile-window according to the value of
+                     ;; `ecb-enlarged-compilation-window-max-height'. If called
+                     ;; non-interactively (e.g. by `compile-internal',
+                     ;; `with-output-to-temp-buffer' etc...) then all the
+                     ;; resizing or shrinking stuff is handled by
+                     ;; `compilation-set-window-height',
+                     ;; `resize-temp-buffer-window' (GNU Emacs) or
+                     ;; `shrink-window-if-larger-than-buffer' (called by the
+                     ;; SHRINK-TO-FIT arg of the XEmacs `display-buffer').
+
+                     ;; We can not do this in the non-interactive case because
+                     ;; here often after the call of display-buffer the buffer
+                     ;; to display does not contain its final contents so the
+                     ;; algorithm of `ecb-toggle-compile-window-height' fails
+                     ;; (e.g. during `compile-internal'!).
+                     (when (interactive-p)
+                       (ecb-set-compile-window-height))
+
+                     (if (member ecb-compile-window-temporally-enlarge
+                                 '(after-selection both))
+                         (setq ecb-layout-prevent-handle-compile-window-selection t)))
+
+                 ;; OK, we have really no compile-window...
+               
+                 ;; needed for TAB-completion if this offers the completions in
+                 ;; a temp-buffer. Without this manually split the whole
+                 ;; edit-window would be used for the completions which is not
+                 ;; the default-behavior of Emacs.
+                 (when (and pop-up-windows
+                            (not (ecb-edit-window-splitted)))
+                   (ecb-layout-debug-error "display-buffer for comp-buffer %s - split edit-window:"
+                                           (ad-get-arg 0))
+                   (ecb-with-adviced-functions (split-window
+                                                ecb-edit-window)))
+                 ;; Here the values of temp-buffer-max-height and
+                 ;; compilation-window-height take effect.
+                 (if ecb-running-xemacs
+                     (setq ad-return-value
+                           (ecb-display-buffer-xemacs (ad-get-arg 0)
+                                                      (ad-get-arg 1)
+                                                      (ad-get-arg 2)
+                                                      (ad-get-arg 3)))
+                   ad-do-it)))
+            
+              ((not (member (ad-get-arg 0) (ecb-get-current-visible-ecb-buffers)))
+               (ecb-layout-debug-error "display-buffer for normal buffer: %s"
+                                       (ad-get-arg 0))
+               (if (and (not (ecb-point-in-edit-window))
+                        (member 'display-buffer ecb-layout-always-operate-in-edit-window))
+                   (ecb-select-edit-window))
+               (if (ecb-compile-window-live-p)
                    (unwind-protect
                        (progn
-                         (mapc (function (lambda (w)
-                                           (set-window-dedicated-p w t)))
-                               edit-window-list)
+                         (set-window-dedicated-p ecb-compile-window t)
                          ;; now we perform the original `display-buffer' but
-                         ;; now the only not dedicated window is the compile
-                         ;; window so `display-buffer' MUST use this.
-                         (if (equal (selected-window) ecb-compile-window)
-                             ;; `display-buffer' tries to split the
-                             ;; compile-window if it is called from the
-                             ;; compile-window (e.g. calling help from the
-                             ;; compile-window). To avoid this we must
-                             ;; temporally set `pop-up-windows' to nil so
-                             ;; `display-buffer' tries no splitting. But this
-                             ;; works only for GNU Emacs. XEmacs does not
-                             ;; shrink to fit if `pop-up-windows' is nil so we
-                             ;; must set it here to t and make the frame
-                             ;; unsplittable.
-                             (let ((pop-up-windows (if ecb-running-xemacs t nil)))
-                               (ecb-layout-debug-error
-                                "display-buffer from comp-win for comp-buf: %s"
-                                (ad-get-arg 0))
-                               (if ecb-running-xemacs
-                                   (unwind-protect
-                                       (progn
-                                         (set-frame-property ecb-frame
-                                                             'unsplittable t)
-                                         (setq ad-return-value
-                                               (ecb-display-buffer-xemacs (ad-get-arg 0)
-                                                                          (ad-get-arg 1)
-                                                                          (ad-get-arg 2)
-                                                                          (ad-get-arg 3))))
-                                     (set-frame-property ecb-frame
-                                                         'unsplittable nil))
-                                 ad-do-it))
-                           (if ecb-running-xemacs
-                               (setq ad-return-value
-                                     (ecb-display-buffer-xemacs (ad-get-arg 0)
-                                                                (ad-get-arg 1)
-                                                                (ad-get-arg 2)
-                                                                (ad-get-arg 3)))
-                             ad-do-it)))
-                     ;; making the edit-window(s) not dedicated
-                     (mapc (function (lambda (w)
-                                       (set-window-dedicated-p w nil)))
-                           edit-window-list))
-                   ;; if called interactively we run now our
-                   ;; `ecb-toggle-compile-window-height' to set the height of
-                   ;; the compile-window according to the value of
-                   ;; `ecb-enlarged-compilation-window-max-height'. If called
-                   ;; non-interactively (e.g. by `compile-internal',
-                   ;; `with-output-to-temp-buffer' etc...) then all the
-                   ;; resizing or shrinking stuff is handled by
-                   ;; `compilation-set-window-height',
-                   ;; `resize-temp-buffer-window' (GNU Emacs) or
-                   ;; `shrink-window-if-larger-than-buffer' (called by the
-                   ;; SHRINK-TO-FIT arg of the XEmacs `display-buffer').
-
-                   ;; We can not do this in the non-interactive case because
-                   ;; here often after the call of display-buffer the buffer
-                   ;; to display does not contain its final contents so the
-                   ;; algorithm of `ecb-toggle-compile-window-height' fails
-                   ;; (e.g. during `compile-internal'!).
-                   (when (interactive-p)
-                     (ecb-set-compile-window-height))
-
-                   (if (member ecb-compile-window-temporally-enlarge
-                               '(after-selection both))
-                       (setq ecb-layout-prevent-handle-compile-window-selection t)))
-
-               ;; OK, we have really no compile-window...
-               
-               ;; needed for TAB-completion if this offers the completions in
-               ;; a temp-buffer. Without this manually split the whole
-               ;; edit-window would be used for the completions which is not
-               ;; the default-behavior of Emacs.
-               (when (and pop-up-windows
-                          (not (ecb-edit-window-splitted)))
-                 (ecb-layout-debug-error "display-buffer for comp-buffer %s - split edit-window:"
-                                         (ad-get-arg 0))
-                 (ecb-with-adviced-functions (split-window
-                                              ecb-edit-window)))
-               ;; Here the values of temp-buffer-max-height and
-               ;; compilation-window-height take effect.
-               (if ecb-running-xemacs
-                   (setq ad-return-value
-                         (ecb-display-buffer-xemacs (ad-get-arg 0)
-                                                    (ad-get-arg 1)
-                                                    (ad-get-arg 2)
-                                                    (ad-get-arg 3)))
-                 ad-do-it)))
+                         ;; now the only not dedicated window(s) are the
+                         ;; edit-window(s)
+                         (if ecb-running-xemacs
+                             (setq ad-return-value
+                                   (ecb-display-buffer-xemacs (ad-get-arg 0)
+                                                              (ad-get-arg 1)
+                                                              (ad-get-arg 2)
+                                                              (ad-get-arg 3)))
+                           ad-do-it)
+                         )
+                     ;; making the compile-window not dedicated
+                     (set-window-dedicated-p ecb-compile-window nil))
+                 (if ecb-running-xemacs
+                     (setq ad-return-value
+                           (ecb-display-buffer-xemacs (ad-get-arg 0)
+                                                      (ad-get-arg 1)
+                                                      (ad-get-arg 2)
+                                                      (ad-get-arg 3)))
+                   ad-do-it)))
             
-            ((not (member (ad-get-arg 0) (ecb-get-current-visible-ecb-buffers)))
-             (ecb-layout-debug-error "display-buffer for normal buffer: %s"
-                                     (ad-get-arg 0))
-             (if (and (not (ecb-point-in-edit-window))
-                      (member 'display-buffer ecb-layout-always-operate-in-edit-window))
-                 (ecb-select-edit-window))
-             (if (ecb-compile-window-live-p)
-                 (unwind-protect
-                     (progn
-                       (set-window-dedicated-p ecb-compile-window t)
-                       ;; now we perform the original `display-buffer' but
-                       ;; now the only not dedicated window(s) are the
-                       ;; edit-window(s)
-                       (if ecb-running-xemacs
-                           (setq ad-return-value
-                                 (ecb-display-buffer-xemacs (ad-get-arg 0)
-                                                            (ad-get-arg 1)
-                                                            (ad-get-arg 2)
-                                                            (ad-get-arg 3)))
-                         ad-do-it)
-                       )
-                   ;; making the compile-window not dedicated
-                   (set-window-dedicated-p ecb-compile-window nil))
-               (if ecb-running-xemacs
-                   (setq ad-return-value
-                         (ecb-display-buffer-xemacs (ad-get-arg 0)
-                                                    (ad-get-arg 1)
-                                                    (ad-get-arg 2)
-                                                    (ad-get-arg 3)))
-                 ad-do-it)))
-            
-            (t ;; buffer is a special ecb-buffer
-             (or (setq ad-return-value (get-buffer-window (ad-get-arg 0) ecb-frame))
-                 (ecb-error "display-buffer can not display not visible ecb-buffers!"))))
+              (t ;; buffer is a special ecb-buffer
+               (or (setq ad-return-value (get-buffer-window (ad-get-arg 0) ecb-frame))
+                   (ecb-error "display-buffer can not display not visible ecb-buffers!")))))
+
     (ecb-layout-debug-error "display-buffer - just run original version.")
     (ecb-with-original-functions
      (if ecb-running-xemacs
 `ecb-other-window-jump-behavior'."
   (if (or (not ecb-minor-mode)
           (not (equal (selected-frame) ecb-frame))
-          (equal ecb-other-window-jump-behavior 'all))
+          (equal ecb-other-window-jump-behavior 'all)
+          ecb-windows-hidden)
       ;; here we process the 'all value of `ecb-other-window-jump-behavior'
-      ad-do-it
+      (ecb-with-original-basic-functions
+       (ecb-with-original-functions
+        ad-do-it))
     ;; in the following cond-clause `ecb-other-window-jump-behavior' can only
     ;; have the values 'only-edit and 'edit-and-compile! we have implemented
     ;; the logic for the values 1 and -1 for ARG-argument of other-window.
                        (frame-live-p (ad-get-arg 1))
                        (list (ad-get-arg 1))))))
     (if (member (get-buffer buf-name) (ecb-get-current-visible-ecb-buffers))
-        (ecb-error "delete-windows-on is not allowed for the special ECB-buffers!")
+        (if ecb-advice-window-functions-signal-error
+            (ecb-error "delete-windows-on is not allowed for the special ECB-buffers!"))
       (dolist (f frames)
         (if (not (equal f ecb-frame))
             (progn
 If WINDOW is an edit-window then this window is deleted, otherwise an error is
 reported."
   (if (or (not ecb-minor-mode)
-          (not (equal (selected-frame) ecb-frame)))
+          (not (equal (selected-frame) ecb-frame))
+          ecb-windows-hidden)
       (ecb-with-original-basic-functions
        (ecb-with-original-functions
         ad-do-it))
            (select-window (ad-get-arg 0))))
      
      (if (not (ecb-point-in-edit-window))
-         (ecb-error "Only an edit-window can be deleted!"))
-     (ad-with-originals 'delete-window
-       (if (ecb-edit-window-splitted)
-           (funcall (intern (format "ecb-delete-window-in-editwindow-%s"
-                                    ecb-layout-name))
-                    (ecb-edit-window-splitted)))))))
+         (if ecb-advice-window-functions-signal-error
+             (ecb-error "Only an edit-window can be deleted!"))
+       (ad-with-originals 'delete-window
+         (if (ecb-edit-window-splitted)
+             (funcall (intern (format "ecb-delete-window-in-editwindow-%s"
+                                      ecb-layout-name))
+                      (ecb-edit-window-splitted))))))))
 
 (defadvice delete-other-windows (around ecb)
   "The ECB-version of `delete-other-windows'. Works exactly like the
 ecb-windows are deleted and in all other cases an error is reported."
   
   (if (or (not ecb-minor-mode)
-          (not (equal (selected-frame) ecb-frame)))
+          (not (equal (selected-frame) ecb-frame))
+          ecb-windows-hidden)
       (ecb-with-original-basic-functions
        (ecb-with-original-functions
         ad-do-it))
            (select-window (ad-get-arg 0))))
      
      (cond ((ecb-point-in-compile-window)
-            (ecb-error "The compile window can not be maximized!"))
+            (if ecb-advice-window-functions-signal-error
+                (ecb-error "The compile window can not be maximized!")))
            ((ecb-point-in-edit-window)
             (ad-with-originals 'delete-window
               (if (ecb-edit-window-splitted)
 error if this function is not contained in
 `ecb-layout-always-operate-in-edit-window'!"
   (if (or (not ecb-minor-mode)
-          (not (equal (selected-frame) ecb-frame)))
-      (ecb-with-original-functions
-       ad-do-it)
+          (not (equal (selected-frame) ecb-frame))
+          ecb-windows-hidden)
+      (ecb-with-original-basic-functions
+       (ecb-with-original-functions
+        ad-do-it))
     (when (and (member 'split-window-horizontally
                        ecb-layout-always-operate-in-edit-window)
                ;; this is needed because otherwise we would also select the 1.
 if this function is not contained in
 `ecb-layout-always-operate-in-edit-window'."
   (if (or (not ecb-minor-mode)
-          (not (equal (selected-frame) ecb-frame)))
-      (ecb-with-original-functions
-       ad-do-it)
+          (not (equal (selected-frame) ecb-frame))
+          ecb-windows-hidden)
+      (ecb-with-original-basic-functions
+       (ecb-with-original-functions
+        ad-do-it))
     (when (and (member 'split-window-vertically
                        ecb-layout-always-operate-in-edit-window)
                (not (ecb-point-in-edit-window)))
 window in another frame than the `ecb-frame') it behaves like the original
 version."
   (if (or (not ecb-minor-mode)
-          (not (equal (selected-frame) ecb-frame)))
-      ad-do-it
+          (not (equal (selected-frame) ecb-frame))
+          ecb-windows-hidden)
+      (ecb-with-original-basic-functions
+       (ecb-with-original-functions
+        ad-do-it))
     ;; if called interactively and WINDOW is nil (i.e. selected window is
     ;; used) then we maybe must first go to the edit-window.
     ;; The check for interactiv-p prevents that we jump to the edit-window if
       (if (not (ecb-edit-window-splitted))
           ;; we allow only an unsplitted edit-window to be splitted
           (if (not (equal window ecb-edit-window))
-              (ecb-error "Only the edit-window of ECB is split-able!")
+              (if ecb-advice-window-functions-signal-error
+                  (ecb-error "Only the edit-window of ECB is split-able!")
+                (setq ad-return-value (selected-window)))
             ad-do-it)
         ;; if already splitted return the "other" edit-window
         (setq ad-return-value
                     ((equal window (next-window ecb-edit-window))
                      ecb-edit-window)
                     (t
-                     (ecb-error "Only the edit-window of ECB is split-able!"))))))))
+                     (if ecb-advice-window-functions-signal-error
+                         (ecb-error "Only the edit-window of ECB is split-able!")
+                       (selected-window)))))))))
 
 (defadvice switch-to-buffer-other-window (around ecb)
   "The ECB-version of `switch-to-buffer-other-window'. Works exactly like the
 If called within an edit-window it behaves like the original function except
 for compilation-buffers \(if a compile-window is used, see above)."
   (if (or (not ecb-minor-mode)
-          (not (equal (selected-frame) ecb-frame)))
+          (not (equal (selected-frame) ecb-frame))
+          ecb-windows-hidden)
       (ecb-with-original-basic-functions
        (ecb-with-original-functions
         ad-do-it))
 contained in the option `ecb-layout-always-operate-in-edit-window'. Otherwise
 an error is reported."
   (if (or (not ecb-minor-mode)
-          (not (equal (selected-frame) ecb-frame)))
+          (not (equal (selected-frame) ecb-frame))
+          ecb-windows-hidden)
       (ecb-with-original-basic-functions
        (ecb-with-original-functions
         ad-do-it))
 is no durable compilation-window then always the first edit-window is chosen."
   (if (or (not ecb-minor-mode)
           (not (equal (selected-frame) ecb-frame))
+          ecb-windows-hidden
           (and ecb-compile-window-height (ecb-compile-window-live-p))
           (not (equal (ecb-point-in-edit-window) 2)))
-      ad-do-it
+      (ecb-with-original-basic-functions
+       (ecb-with-original-functions
+        ad-do-it))
     ;; point stays in the "other" edit-window and there is no
     ;; compilation-window
     (let ((other-window-scroll-buffer (window-buffer ecb-edit-window)))
                       (window-buffer window)))
           (ecb-canonical-ecb-windows-list)))
 
-(defvar ecb-windows-hidden t
+(defvar ecb-windows-hidden nil
   "Used with `ecb-toggle-ecb-windows'. If true the ECB windows are hidden. Do
 not change this variable!")
 
             (run-hooks 'ecb-redraw-layout-before-hook)
             ;; if ecb-current-maximized-ecb-buffer-name is not nil then this
             ;; means we should only restore this one maximized buffer!
+            (setq ecb-windows-hidden t)
             (if ecb-current-maximized-ecb-buffer-name
                 (ecb-maximize-ecb-window ecb-current-maximized-ecb-buffer-name)
               (ecb-redraw-layout-full))
           ;; we have to unfix all our ECB windows!!
           (ecb-set-window-size-fixed nil)
           (ecb-with-original-functions
-           (let* ((config (ecb-window-configuration))
+           (let* ((config (ecb-window-configuration-data))
                   (split-before-redraw (car (nth 0 config)))
                   (split-amount-before-redraw (cdr (nth 0 config)))
                   (window-before-redraw (nth 1 config))
           (run-hooks 'ecb-hide-ecb-windows-after-hook)
           (message "ECB windows are now hidden."))))))
 
+
 (defun ecb-hide-ecb-windows ()
   "Hide the ECB windows if not already hidden."
   (interactive)
 
 ;; This function must savely work even if `ecb-edit-window' is not longer
 ;; alive, which should normally not happen!
-(defun ecb-window-configuration ()
+(defun ecb-window-configuration-data ()
   "Return current window configuration of the ecb-frame as a list with the
 following structure:
 0. Edit-window split data: cons with car is a boolean if the edit-window is
    current point of the compile-buffer if the compile-window is selected
    \(otherwise nil) and third elem is the current height of the
    compile-window."
-  (let ((split (ecb-edit-window-splitted))
-        (selected-window (ecb-where-is-point)))
-    (list (cons split (if (equal split 'vertical)
-                          (window-height ecb-edit-window)))
-          (if (numberp selected-window) selected-window)
-          (if (numberp selected-window) (point))
-          (ignore-errors (cons (window-buffer ecb-edit-window)
-                               (window-start ecb-edit-window)))
-          (if split
-              (ignore-errors (cons (window-buffer (next-window
-                                                   ecb-edit-window))
-                                   (window-start (next-window
-                                                  ecb-edit-window)))))
-          (if (and ecb-compile-window-height
-                   (ecb-compile-window-live-p))
-              (list (window-buffer ecb-compile-window)
-                    (if (equal selected-window 'compile) (point))
-                    (window-height ecb-compile-window)))
-          )
-    ))
+  (if (or (not ecb-windows-hidden)
+          (< (ecb-with-original-basic-functions
+              (count-windows)) 3))
+      (let ((split (ecb-edit-window-splitted))
+            (selected-window (ecb-where-is-point)))
+        (list (cons split (if (equal split 'vertical)
+                              (window-height ecb-edit-window)))
+              (if (numberp selected-window) selected-window)
+              (if (numberp selected-window) (point))
+              (ignore-errors (cons (window-buffer ecb-edit-window)
+                                   (window-start ecb-edit-window)))
+              (if split
+                  (ignore-errors (cons (window-buffer (next-window
+                                                       ecb-edit-window))
+                                       (window-start (next-window
+                                                      ecb-edit-window)))))
+              (if (and ecb-compile-window-height
+                       (ecb-compile-window-live-p))
+                  (list (window-buffer ecb-compile-window)
+                        (if (equal selected-window 'compile) (point))
+                        (window-height ecb-compile-window)))
+              ))
+      ;; we have to return a window-config for only one window which is the
+      ;; window of the current buffer
+      (list '(nil)
+            nil
+            nil
+            (cons (current-buffer)
+                  (window-start (selected-window)))
+            nil
+            nil)))
 
 ;; =================== Helper functions ==================================
 
          (delete-window (next-window))
          t)
         ((equal (ecb-point-in-edit-window) 2)
-         (let ((prev-height (window-height (previous-window
-                                            (selected-window) 0))))
+         (let ((prev-height (+ (if ecb-running-xemacs 0 2)
+                               (window-height (previous-window
+                                               (selected-window) 0)))))
            (setq ecb-edit-window (selected-window))
            (delete-window (previous-window (selected-window) 0))
            (if (equal split 'vertical)
 
 (defun ecb-delete-window-ecb-windows-top (split)
   (cond ((equal (ecb-point-in-edit-window) 1)
-         (let ((height (1+ (window-height (selected-window)))))
+         (let ((height (+ (if ecb-running-xemacs 0 2)
+                          (window-height (selected-window)))))
            (setq ecb-edit-window (next-window))
            (delete-window)
            (if (equal split 'vertical)
    \(`ecb-compile-window' is nil)
 
 Things CREATE-CODE can do or can use:
-1. The value of `ecb-compile-window' which contains the compile-window \(if
-   there is one). Using the values of `ecb-compile-window-height',
-   `ecb-windows-width', `ecb-windows-height'.
+1. Using the values of `ecb-compile-window-height', `ecb-windows-width',
+   `ecb-windows-height' and `ecb-compile-window-width'.
 
 Things CREATE-CODE must NOT do:
 1. Splitting the edit-window
 2. Creating a compile-window
 3. Deleting the edit-window, the compile-window \(if there is any) or the
    ECB-windows-column\(s)/row \(see Precondition 1.)
-4. Referring to the value of `ecb-edit-window' because this is always nil or
-   undefined during CREATE-CODE.
+4. Referring to the values of `ecb-edit-window' or `ecb-compile-window'
+   because these values are always nil or undefined during CREATE-CODE.
+5. Using the functions `ecb-edit-window-live-p' or `ecb-compile-window-live-p'.
 
 Postconditions for CREATE-CODE:
 1. The edit-window must be the selected window and must not be dedicated.
                    (ecb-choose-layout-name (ecb-available-layouts-of-type nil)
                                            t)))))
 
+(defun ecb-current-window-configuration ()
+  "Return the current ecb-window-configuration.
+Result is a four-element list with:
+0. Result of `current-window-configuration'
+1. List of buffers which are currently dedicated in the ecb-frame
+2. The number of the `ecb-edit-window' in the `ecb-window-list' of the
+   `ecb-frame'
+3. The number of the `ecb-compile-window' in the `ecb-window-list' of the
+   `ecb-frame' \(nil if there is no compile-window alive)
+
+If the special ECB-windows are hidden at call-time then the last three
+elements are nil!"
+  (if ecb-windows-hidden
+      (list (current-window-configuration ecb-frame) nil nil nil)
+    (list (current-window-configuration ecb-frame)
+          (ecb-get-current-visible-ecb-buffers)
+          (if (ecb-edit-window-live-p)
+              (ecb-window-number ecb-edit-window))
+          (if (ecb-compile-window-live-p)
+              (ecb-window-number ecb-compile-window)))))
+
+(defun ecb-set-window-configuration (ecb-window-config)
+  "Restore a window-configuration ECB-WINDOW-CONFIG which must be returned by
+`ecb-current-window-configuration'."
+  (ecb-make-windows-not-dedicated ecb-frame)
+  (ecb-with-original-functions
+   (ecb-with-original-basic-functions
+    (set-window-configuration (nth 0 ecb-window-config))))
+  ;; we have to reset the dedicated state because it is not preserved by
+  ;; `current-window-configuration' and `set-window-configuration'! At least
+  ;; not with GNU Emacs 21.X, In addition we have to reset ecb-edit-window and
+  ;; ecb-compile-window and also to set ecb-windows-hidden correctly
+  (and (nth 1 ecb-window-config)
+       (ecb-set-windows-dedicated-state (nth 1 ecb-window-config) t))
+  (when (or (nth 2 ecb-window-config)
+            (nth 3 ecb-window-config))
+    (let ((win-list (ecb-window-list ecb-frame 0
+                                     (frame-first-window ecb-frame))))
+      (and (nth 2 ecb-window-config)
+           (setq ecb-edit-window (nth (nth 2 ecb-window-config) win-list)))
+      (and ecb-compile-window-height
+           (nth 3 ecb-window-config)
+           (setq ecb-compile-window (nth (nth 3 ecb-window-config) win-list)))))
+  (and (nth 1 ecb-window-config)
+       (setq ecb-windows-hidden nil)))
+
 (defun ecb-redraw-layout()
-  "Redraw the ECB screen.
+  "Redraw the ECB screen quickly.
 If the variable `ecb-redraw-layout-quickly' is not nil then the redraw is done
 by the `ecb-redraw-layout-quickly' function, otherwise by
-`ecb-redraw-layout-full'. But it's strongly recommended to use the quick
-redraw only if you have really slow machines where a full redraw takes several
-seconds because the quick redraw is not really safe and may have some
-drawbacks! On normal machines the full drawback should be done in << 1s!"
+`ecb-redraw-layout-full'.
+
+Please not: It's strongly recommended to use the quick redraw only if you have
+really slow machines where a full redraw takes several seconds because the
+quick redraw is not really safe and has some annoying drawbacks! On normal
+machines the full redraw should be done in << 1s so there should be no need
+for the quick version!"
   (interactive)
 
   (message "ECB redrawing layout...")
              (equal (selected-frame) ecb-frame))
     ;; this functions are only needed at runtime!
     (ecb-load-layouts)
-    (let* ((config (ecb-window-configuration))
+    (let* ((config (ecb-window-configuration-data))
            (split-before-redraw (car (nth 0 config)))
            (split-amount-before-redraw (cdr (nth 0 config)))
            (window-before-redraw (nth 1 config))
             (nth 2 compile-window-config))
            (ecb-windows-before-redraw (ecb-get-current-visible-ecb-buffers)))
 
+      (ecb-layout-debug-error "ecb-redraw-layout-full: config: %s, hidden-state: %s, curr-buff: %s, last-source-buff: %s"
+                              config ecb-windows-hidden (current-buffer)
+                              ecb-last-source-buffer)
+      
       ;; The following code runs with deactivated adviced functions, so the
       ;; layout-functions can use the original function-definitions.
       (ecb-with-original-functions
-      
-       ;; first we go to the edit-window
-       (if (ecb-edit-window-live-p)
+
+       ;; first we go to the most senseful edit-window/buffer
+       (if (and (not ecb-windows-hidden)
+                (ecb-edit-window-live-p))
            (ecb-select-edit-window)
          ;; if the edit-window is destroyed (what should never happen) we try
          ;; to go first to the last edited buffer, second to the
          ;; scratch-buffer or third - if both of them don't exist - we stay in
          ;; the current buffer.
          (set-window-dedicated-p (selected-window) nil)
-         (switch-to-buffer (or (and (buffer-live-p ecb-last-source-buffer)
-                                    ecb-last-source-buffer)
-                               (get-buffer "*scratch*")
-                               (current-buffer))))
+         (if (not ecb-windows-hidden)
+             (switch-to-buffer (or (and (buffer-live-p ecb-last-source-buffer)
+                                        ecb-last-source-buffer)
+                                   (get-buffer "*scratch*")
+                                   (current-buffer)))))
        
        (ecb-do-with-unfixed-ecb-buffers
         ;; Do some actions regardless of the chosen layout
         ;; window.
         
         );; end ecb-do-with-unfixed-ecb-buffers
+
+       (setq ecb-windows-hidden nil)
        
        ;; Now all the windows must be created and the editing window must not
        ;; be splitted! In addition the variables `ecb-edit-window' and
               (ecb-some (function (lambda (buf)
                                     (and (not (string= "*Completions*"
                                                        (buffer-name buf)))
+                                         (not (ecb-check-for-special-buffer buf))
                                          (ecb-compilation-buffer-p buf))))
                         (buffer-list ecb-frame))
               (get-buffer-create "*scratch*"))))
 
        );; end of ecb-with-original-functions       
       
-      (setq ecb-windows-hidden nil)
-
       (let ((current-ecb-windows (ecb-get-current-visible-ecb-buffers)))
         ;; fill-up the history new with all buffers if the history buffer was
         ;; not shown before the redisplay but now (means if the layout has
                                 ecb-windows-before-redraw))
                    (member (get-buffer ecb-history-buffer-name)
                            current-ecb-windows))
-          (ecb-add-all-buffers-to-history))
+          (ecb-add-buffers-to-history))
         ;; update the directories buffer if the directories buffer was not
         ;; shown before the redisplay but now (means if the layout has
         ;; changed)
 ;; TODO: this function is a first try to use the built-in window-configuration
 ;; stuff of Emacs for the layout-redraw. But currently this does not work
 ;; really well, there is a lot of work to do (Klaus).
-
 (defun ecb-redraw-layout-quickly()
   "Redraw the layout quickly using the cached window configuration
 `ecb-activated-window-configuration'."
     (let((main-window-buffer nil)
          (compilation-window-buffer nil))
       
-      ;; lets try to make this save.
-      ;; TODO: Does not really work well....
-    
       (if (ecb-edit-window-live-p)
           (setq main-window-buffer (window-buffer ecb-edit-window))
         (setq compilation-window-buffer "*scratch*")
       (ecb-with-original-functions
        (set-window-configuration ecb-activated-window-configuration))
 
+      
       ;;OK... now restore the buffers in the compile and edit windows..
 
       (if main-window-buffer
       (if new-state
           (let ((height (car (get 'ecb-compile-window-height 'saved-value))))
             (when (numberp height)
-              (customize-set-variable 'ecb-compile-window-height height)))
-        (customize-set-variable 'ecb-compile-window-height nil))
-      ;; toggling (ecb-redraw-layout-full) only preserves point and selected
-      ;; window if called from an edit- or compile-window. If called from an
-      ;; ECB-window we have to restore it here.
-      (when ecb-buf
-        (setq new-win (get-buffer-window ecb-buf))
-        (if (and new-win (window-live-p new-win)
-                 (equal (window-frame new-win) ecb-frame))
-            (select-window new-win))))))
+              (customize-set-variable 'ecb-compile-window-height height))
+            ;; ecb-redraw-layout-full only preserves point and selected window
+            ;; if called from an edit- or compile-window. If called from an
+            ;; ECB-window we have to restore it here.
+            (when ecb-buf
+              (setq new-win (get-buffer-window ecb-buf))
+              (if (and new-win (window-live-p new-win)
+                       (equal (window-frame new-win) ecb-frame))
+                  (select-window new-win))))
+        (when (ecb-compile-window-live-p)
+          (let ((point-location (ecb-where-is-point)))
+            (ecb-with-original-functions
+             (ecb-with-original-basic-functions
+              (delete-window ecb-compile-window)))
+            ;; If point was in the compile-window we move it back to the first
+            ;; edit-window
+            (if (equal point-location 'compile)
+                (ecb-select-edit-window))))))))
+
 
 (silentcomp-provide 'ecb-layout)
 
   (require 'silentcomp))
 
 (require 'ecb-util)
+(require 'ecb-face)
 
 ;; XEmacs
 (silentcomp-defun redraw-modeline)
+(silentcomp-defun make-extent)
+(silentcomp-defun set-extent-face)
 ;; Emacs
 (silentcomp-defun force-mode-line-update)
+(silentcomp-defun propertize)
+
+(defgroup ecb-mode-line nil
+  "Settings for the modelines of the ECB-tree-buffers."
+  :group 'ecb-general
+  :prefix "ecb-")
 
 
 (defcustom ecb-mode-line-prefixes '((ecb-directories-buffer-name . nil)
-                                    (ecb-sources-buffer-name . nil)
+                                    (ecb-sources-buffer-name . ecb-sources-filter-modeline-prefix)
                                     (ecb-methods-buffer-name . nil)
-                                    (ecb-history-buffer-name . "History"))
+                                    (ecb-history-buffer-name . ecb-history-filter-modeline-prefix))
   "*Prefixes shown in the modelines of the special ECB-buffers.
 The displayed prefix then looks like: \"[ <PREFIX>[: ]]\", means if a prefix
 is defined for an special ECB-buffer then a single space is prepended and if
 If a special ECB-buffer should not have a prefix in its modeline then this
 buffer-name should either not being added to this option or added with \"No
 prefix\" \(= nil as cdr)."
-  :group 'ecb-general
+  :group 'ecb-mode-line
   :set (function (lambda (symbol value)
                    (set symbol value)
                    (if (and (boundp 'ecb-minor-mode)
 
 Currently this feature is only available for GNU Emacs 21.X, because neither
 GNU Emacs < 21 nor XEmacs can evaluate dynamically forms in the mode-line."
-  :group 'ecb-general
+  :group 'ecb-mode-line
   :set (function (lambda (symbol value)
                    (set symbol value)
                    (if (and (boundp 'ecb-minor-mode)
 
 
   
-
 (defcustom ecb-mode-line-data '((ecb-directories-buffer-name . sel-dir)
                                 (ecb-sources-buffer-name . sel-dir)
                                 (ecb-methods-buffer-name . sel-source)
-                                (ecb-history-buffer-name . nil))
+                                (ecb-history-buffer-name . "History"))
   "*Data shown in the modelines of the special ECB-buffers.
 Everey element of this list is a cons-cell where the car is used to define a
 buffer-name and the cdr to define the modeline-data for that buffer. For
 modeline-data and the latter one the current selected source-file \(without
 path).
 
-In addition to these two predefined values for every special ECB-buffer a
-function can be specified which gets three args \(name of the buffer, current
-selected directory and current selected source-file) and must return a string
-which will be displayed in the modeline \(or nil if no data should be
-displayed).
+In addition to these two predefined values for every special ECB-buffer either
+a simple string \(which will be displayed) or a function can be specified
+which gets three args \(name of the buffer, current selected directory and
+current selected source-file) and must return a string which will be displayed
+in the modeline \(or nil if no data should be displayed).
 
 If a special ECB-buffer should not display special data in its modeline then
 this buffer-name should either not being added to this option or added with
 The whole modeline of the special ECB-buffer consists of the prefix of
 `ecb-mode-line-prefixes' and the data of `ecb-mode-line-data' - eventually
 prepended by the window-number, see `ecb-mode-line-display-window-number'."
-  :group 'ecb-general