Thierry Volpiatto writes:
> Say you write a `foo' class inheriting from `bar', and you write a
> defmethod against `bar' to modify say the actions on `bar' for `foo'.
> Then you write a `baz' class inheriting also from `bar': Question, do
> you want have its actions modified as `foo' ?
In my case: YES. More concretely, I want to modify the list of actions
defined in
(defmethod helm--setup-source :before ((source helm-type-file)) ...)
since I don't want to use the default actions, but different ones, for
every source that derives from that list. This includes child classes.
I have to do it this way because the action list is hardcoded in the
code. If it was defined in a variable, e.g.
`helm-source-type-file-default-actions' (even better an option), life
would be much easier.
Ideally, all longer action lists should be defined as a variable IMHO.
It's overkill to need to cope with classes and their methods for this
basic task. AFAIR that's what I suggested in the quoted thread.
> > Anyway, we need to make all that work more transparent somehow. With
> > other words, see
https://github.com/emacs-helm/helm/issues/781.
>
> If you define the slots directly in the class, they will overhide the
> ones of the child class, isn't that clear ?
Of course. I guess you just didn't have my use case in mind, it was
intended.
> I have started a section explaining all this in Home.mdpp, but didn't
> had the time to finish it and push it to wiki, have a look, if you
> want to write examples go ahead.
That's good; will try to have a look tonight.
Regards,
Michael.