Bug#672184: Bug#671551: ecasound-el: debian-pkg-add-load-path-item

Alessandro Ghedini al3xbio at gmail.com
Wed May 16 20:52:05 UTC 2012


On Wed, May 16, 2012 at 08:54:11AM +1000, Kevin Ryde wrote:
> Alessandro Ghedini <al3xbio at gmail.com> writes:
> >
> >> ...
> >> (add-to-list 'auto-mode-alist '("\\.ewf\\'" . ecasound-ewf-mode))
> >
> > Is this correct?
> 
> Pretty close.
> 
> It's good to wrap it all in a package-dir existence check like that
> haml-elisp bit, because with "dpkg --remove" the /etc startup file is
> left behind but the rest of the package is gone.  This is important for
> an auto-mode-alist entry since if the ecasound.el is gone then visiting
> a .ewf would get an error, where you'd prefer left as fundamental-mode
> or whatever.
> 
>    ;; If package-dir does not exist, the haml-mode package must have
>    ;; removed but not purged, and we should skip the setup.
>    (when (file-directory-p package-dir)
>      (autoload ...)
>      (auto-mode-alist ...))
> 
> I don't know how often anyone uses dpkg --remove on lisp packages.
> Perhaps by mistake when --purge was intended :-).

Sounds reasonable, what about the following?

> (let ((package-dir (concat "/usr/share/"
>                            (symbol-name debian-emacs-flavor)
>                            "/site-lisp/ecasound-el")))
> 
>  (debian-pkg-add-load-path-item package-dir)
> 
>  (autoload 'ecasound "ecasound"
>     "Run an inferior ecasound, with I/O through BUFFER." t)
>  (autoload 'ecasound-ewf-mode "ecasound"
>     "A major mode for editing ecasound .ewf files." t)
> 
>  (add-to-list 'auto-mode-alist '("\\.ewf\\'" . ecasound-ewf-mode)))

Cheers

-- 
perl -E '$_=q;$/= @{[@_]};and s;\S+;<inidehG ordnasselA>;eg;say~~reverse'
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.alioth.debian.org/pipermail/pkg-multimedia-maintainers/attachments/20120516/39015a23/attachment.pgp>


More information about the pkg-multimedia-maintainers mailing list