Skip to content

Activation and Deactivation

Ryan Ware edited this page Jan 2, 2016 · 1 revision

Activation and Deactivation

This chapter describes all aspects of activating and deactivating ECB.

IMPORTANT: Regardless of the activation-type (standard or automatic) the activation-process of ECB is always completely failure-save. This means any error during any step of the activation-process forces a complete cleanup (e.g. removing hooks, disabling advices etc.) of all settings ECB did (e.g. adding hooks, activating advices etc.) until the failure. Therefore if ECB-activation stops cause of a failure then you can be sure that your Emacs has the same state as before the ECB-activation-start!

Standard activation and deactivation

Call M-x ecb-activate and M-x ecb-deactivate to activate or deactivate ECB [1]. If you want ECB started in a new frame see the option ecb-new-ecb-frame (default is nil). ecb-activate always raises and selects the ECB-frame even if ECB is already started.

Because ECB is a global minor-mode it can also be (de)activated/toggled by M-x ecb-minor-mode.

The following sequence of hooks is evaluated during activation of ECB:

  1. ecb-before-activate-hook
  2. "All actions for activation but no layout drawing"
  3. ecb-activate-before-layout-draw-hook
  4. ecb-redraw-layout-before-hook
  5. "Drawing the layout"
  6. ecb-redraw-layout-after-hook
  7. ecb-activate-hook

The following sequence of hooks is evaluated during deactivation of ECB:

  1. ecb-before-deactivate-hook
  2. "All actions for deactivation of ECB"
  3. ecb-deactivate-hook

Automatic activation and deactivation

There are two ways for auto. (de)activation ECB after Emacs-start and for different window-configurations.

  1. ecb-auto-activate

    This option is for auto. activating ECB after Emacs-startup. Set this to not nil and ECB will automatically be started after Emacs comes up.

  2. Window-Manager Support

    The window-manager support of ECB deactivates ECB when going to another window-configuration and reactivates ECB when coming back to the ECB-window-configuration. For all details about this see Window-managers and ECB.

Footnotes

[1] Activation is also possible via the menu “Tools –> Start Code Browser (ECB)”.

Clone this wiki locally