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

Kevin Ryde user42 at zip.com.au
Tue May 15 22:54:11 UTC 2012


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 :-).



-- 
I bought a packet of baby powder mixed it up with some water, put it in
the oven, but it came out a blob looking nothing like a baby.





More information about the pkg-multimedia-maintainers mailing list