[Top][All Lists]

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

Re: doc-view compilation warnings

From: Stefan Monnier
Subject: Re: doc-view compilation warnings
Date: Tue, 23 Oct 2007 15:00:09 -0400
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/23.0.50 (gnu/linux)

>> > +(push '("\\.[eE]?[pP][sS]\\'" . doc-view-mode-maybe) auto-mode-alist)
>> > +(push '("\\.[Dd][Vv][Ii]\\'"  . doc-view-mode-maybe) auto-mode-alist)
>> > +(push '("\\.[Pp][Dd][Ff]\\'"  . doc-view-mode-maybe) auto-mode-alist)
>> In general loading a file should not have side effects like this. 
>> IMHO, it is not idea to do things this way...

> So what would you suggest?  A function `doc-view-initialize' that does
> this?

You could put it directly into files.el.  Or (tho less good) put it into
`doc-view-mode' (so loading the file doesn't have any side-effect, though
using doc-view does).

> Oh, and the code has another problem: `push' is a cl function which may
> not be used at runtime...

No: `push' has never been a CL function: it used to be a CL macro and
nowadays it's a standard ELisp macro (tho CL replaces it with a turbocharged
version of it).  So you can use it alright (tho you may prefer add-to-list
in order to avoid adding the entry several times).


reply via email to

[Prev in Thread] Current Thread [Next in Thread]