Skip to content

Add ergo-mode-hook to Emacs ergo-mode and run it #11

@rpgoldman

Description

@rpgoldman

Is your feature request related to a problem? Please describe.
I expect to be able to customize the behavior of ergo-mode, and the standard way to do this for an Emacs major mode is to have a mode-hook.

Describe the solution you'd like
Add ergo-mode-hook variable (see Hooks chapter of Emacs lisp manual and Major Modes description) per this

Each major mode should have a normal mode hook named modename-mode-hook. The very last thing the major mode command should do is to call run-mode-hooks. This runs the normal hook change-major-mode-after-body-hook, the mode hook, the function hack-local-variables (when the buffer is visiting a file), and then the normal hook after-change-major-mode-hook.

(defvar ergo-mode-hook)

and revise the last line of ergo-mode to (run-mode-hooks 'ergo-mode-hook 'flora-mode-hook) currently ergo-mode only runs flora-mode-hook which isn't what Emacs users will expect.

If you prefer, I can provide a Merge Request for this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions