Hello Dmitry,

You CCed your message to <sub...@bugs.debian.org> instead of
<847...@bugs.debian.org>.  I've resent it for you.  Please check To,Cc
carefully!

On Tue, Dec 13, 2016 at 01:53:00PM +0300, Dmitry Bogatov wrote:
> I see two actions we can perform to improve our situation.
> 
>  1. Install README.Debian file by dh-elpa if we detect that package is
>     theme and no README.Debian is already provided. If README.Debian is
>     provided, we can grep it for 'package-initialize', to ensure that
>     it mentions this issue.

As I said in another thread, I don't think we should implement code to
merge a note into README.Debian when this is at best a temporary
solution.  Too many edge cases.

>  2. We can advice #'load-theme. Something like this:
> 
>       ~~~elisp
>       (defadvice load-theme
>           (before load-theme-before-enabling (theme no-confirm no-enable))
>         "Function autoloads are handled elegantly by dh-elpa.  After 
> installing a
>       package, you can just put (turn-on-some-global-minor-mode) in your
>       ~/.emacs, and everything works fine.
> 
>       Themes defined with `deftheme' don't work so well.  After installing a
>       theme, a simple call to `load-theme' in your ~/.emacs will fail. This 
> advice
>       'require's a feature, that correspond to theme to be loaded."
>         (ignore-errors
>           (require (intern (format "%s-theme" theme)))))
>       ~~~
> 
>     I know that advices are dangerous, but I believe that this one can
>     not have any implications, beside negligible perfomance ones.

Thank you very much for this code snippet.  dh_elpa could add it to the
emacsen-startup script for a theme package.  I'll look into implementing
this towards the end of this month.

-- 
Sean Whitton

Attachment: signature.asc
Description: PGP signature

Reply via email to