From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: doc-view compilation warnings Date: Tue, 23 Oct 2007 15:00:09 -0400 Message-ID: References: <87wsth6vk5.fsf@catnip.gol.com> <878x5wrgnv.fsf@baldur.tsdh.de> <87prz6yn1c.fsf@baldur.tsdh.de> <200710231430.l9NEUk8x012690@oogie-boogie.ics.uci.edu> <87ejflzv18.fsf@baldur.tsdh.de> <200710231607.l9NG7EoD016139@oogie-boogie.ics.uci.edu> <87abq9zpnz.fsf@baldur.tsdh.de> <200710231835.l9NIZ7HB025212@oogie-boogie.ics.uci.edu> <87640xzn9p.fsf@baldur.tsdh.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1193166055 6037 80.91.229.12 (23 Oct 2007 19:00:55 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 23 Oct 2007 19:00:55 +0000 (UTC) Cc: Richard Stallman To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Oct 23 21:00:56 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1IkOzn-0005Lm-GI for ged-emacs-devel@m.gmane.org; Tue, 23 Oct 2007 21:00:55 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IkOzf-0006AB-Of for ged-emacs-devel@m.gmane.org; Tue, 23 Oct 2007 15:00:47 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IkOzC-0005b0-5W for emacs-devel@gnu.org; Tue, 23 Oct 2007 15:00:18 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IkOzA-0005Y6-4W for emacs-devel@gnu.org; Tue, 23 Oct 2007 15:00:17 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IkOz9-0005Xk-Us for emacs-devel@gnu.org; Tue, 23 Oct 2007 15:00:15 -0400 Original-Received: from tomts36.bellnexxia.net ([209.226.175.93] helo=tomts36-srv.bellnexxia.net) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1IkOz5-0006Nt-Ka; Tue, 23 Oct 2007 15:00:11 -0400 Original-Received: from pastel.home ([74.12.205.156]) by tomts36-srv.bellnexxia.net (InterMail vM.5.01.06.13 201-253-122-130-113-20050324) with ESMTP id <20071023190010.TNVC7990.tomts36-srv.bellnexxia.net@pastel.home>; Tue, 23 Oct 2007 15:00:10 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id D633F8564; Tue, 23 Oct 2007 15:00:09 -0400 (EDT) In-Reply-To: <87640xzn9p.fsf@baldur.tsdh.de> (Tassilo Horn's message of "Tue\, 23 Oct 2007 20\:41\:54 +0200") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/23.0.50 (gnu/linux) X-detected-kernel: by monty-python.gnu.org: Solaris 8 (1) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:81586 Archived-At: >> > +(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). Stefan