[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Question on auto-mode-alist



On Mon, Apr 03, 2000 at 07:43:07AM +0000, W. Borgert wrote:

> I didn't found anything in the Debian policy, nor in the
> Debian emacs policy, and nothing in the Debian emacsen
> mailing list, so:  Is there anything I can do about file
> extensions, that Emacs already treats as something else?
> In my new package ttcn-el, I want to handle .mp files
> (TTCN.MP), while GNU Emacs normally has assigned this
> extension to MetaPost files.
> 
> My current solution is, not to include the new extension
> in the auto-mode-alist and just to document that users
> have to put it in their .emacs, but it would be nice to
> have a mechanism similar to our different MIME-handlers.
> Is there something like this in Debian?

I do not think that Debian has already infrastructure for that, but you
might do something as follows: create a debconf question in your package
that asks a question about including an entry for .mp files in
auto-mode-alist or keeping the default.  The debconf script will then create
a configuration file (say, /etc/ttcn-el.rc) containing the answer.  Finally,
this file will be read by your Emacs Lisp initialization script (in
/etc/emacs/site-start.d/) and take the appropriate action.

-- 
Rafael Laboissière <rafael@icp.inpg.fr>


Reply to: