antonj / Highlight-Indentation-for-Emacs

Minor modes to highlight indentation guides in emacs.
467 stars 56 forks source link

Missing function #22

Closed krzysztof-magosa closed 9 years ago

krzysztof-magosa commented 9 years ago

highlight-indentation.el:161:1:Warning: the function `derived-mode-class' is not known to be defined.

jmay commented 9 years ago

error introduced in https://github.com/antonj/Highlight-Indentation-for-Emacs/commit/8fb5a97c5ca2fcabb0f4e751b5bef795b7477cd2

This package now depends on derived.el

rNoz commented 9 years ago

That's true. I don't know if the proper way to specify the dependency is with "require", or if it uses elpa/melpa, with its own system.

I created a first specfic version for stylus-mode (the mode I really wanted to provide this extension, and it does not have dependencies), but after I saw that it uses sws-mode and that there are other modes that use also sws, I decided to use the common feature for indentation. Also, derived.el is a built-in package.

jmay commented 9 years ago

Since you are using a built-in, I think you just need to put

(require 'derived)

at the top of your code. I haven't created any of my own packages, so not sure what you need to specify if you are depending on another MELPA package.

rNoz commented 9 years ago

Yes, thanks, I know. But I don't know how should be corrected this dependency "error". Maybe you or the package maintainer could provide the best solution.

I mean, I am using this package directly with the "require" of derived.el because I am using stylus-mode, but because this package is in elpa, the best way should be with its own "dependency system". Should I add it or maybe better do I provide the first solution (without dependency but only works for stylus-mode and not every sws derived mode)?

These are questions that maybe experienced contributors to elpa and/or emacs packages could answer better than me, that is just the first time. It is better avoid dependencies or provide solutions that work in more cases?

antonj commented 9 years ago

Is this function removed on some emacs versions? derived-mode-class, it is marked as obsolete... Pushed quick fix 5e55cea0ffcb81381c86a0c15967f8489bf09bd0

jmay commented 9 years ago

@antonj I like this approach. Means that we don't need to (require 'derived) ourselves if we don't care about this feature.